Hi. During an optimization effort, I’ve discovered since we’re running the RankMath SEO plugin, Kadence is loading a tiny file /wp-content/themes/kadence/assets/css/rankmath.min.css?ver=1.2.27.
This file contains just 1 CSS rule.
.rank-math-list-item {
margin-bottom: 2em;
}
So I’m dequeueing it (from within my child theme) as such:
/**
* De-enqueues the file /assets/css/rankmath.min.css which is enqueued as ‘kadence-rankmath’
* via Kadence theme at wp-content/themes/kadence/inc/components/rankmath/component.php.
*/
function dequeue_kadence_rank_math_styles() {
wp_dequeue_style( ‘kadence-rankmath’ );
}
add_action( ‘wp_enqueue_scripts’, ‘dequeue_kadence_rank_math_styles’, 100 );
is this really necessary? Seems a bit silly. Also, btw, that file wp-content/themes/kadence/inc/components/rankmath/component.php contains some spelling errors and references Restrict Content Pro erroneously in the comments, so someone might want to fix that regardless.