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' );
} );

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注