Remove Google Fonts

Remove Google Fonts

By default, Google Fonts won』t load if you don』t choose a Google Font in the customizer. If for some reason you still want to remove it. Try the PHP snippet below:

add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'generate-fonts' );
} );

If you wish to remove Google Fonts from the customizer as well, you can use the PHP snippet below: 

add_action( 'admin_init', function() {
add_filter( 'generate_google_fonts_array', '__return_empty_array' );
} );

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註