In my last post I described how to host Google fonts files locally on your domain if you use WordPress. I also described how this will lead to better Core Web Vitals which is now an SEO ranking factor.
If you use the Genesis theme in WordPress (or one of its child themes) you may notice that the Source Sans Pro Google font loads by default from the Google CDN (e.g. fonts.googleapis.com) even if you don’t use the font. This will prove detrimental to your Core Web Vitals (and SEO) so it’s worth hosting the font locally if you use it or disable it totally if you don’t use it on your website.
It can prove difficult to find how to disable the loading of the Source Sans Pro font from the Google CDN. Fortunately the action below, when saved to your functions.php, will stop the loading of the Source Sans Pro from the Google CDN.
add_action( 'init', function () {
remove_action( 'wp_enqueue_scripts', 'genesis_sample_enqueue_scripts_styles' );
} );
Leave a ReplyCancel reply