Remove Google Fonts

Remove Google Fonts from Twenty Sixteen theme

In this example I removed Google Fonts from the WordPress TwentySixteen child theme.

function lbp_twentysixteen_child_dequeue_google_fonts() {
wp_dequeue_style( 'twentysixteen-fonts' );
add_action( 'wp_enqueue_scripts', 'lbp_twentysixteen_child_dequeue_google_fonts', 20 );

First create a unique function in the child theme’s functions.php file where style can be dequeued using the parent theme’s handle. Then add this as an action to run a little later than the parent theme’s enqueue process.

I’ve read that the default enqueue value in most themes is 10, so running it at twenty will remove it later in the loading process.





Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.