Dequeue Google Fonts
-
Hi!
I’m trying to remove the loading of Google Fonts from the theme, because I want to save the webfonts locally to save DNS requests.
While digging through the code of the theme I found the following lines:
wp_enqueue_style( 'onepress-fonts', onepress_fonts_url(), array(), null );So I wrote a function in my child theme’s functions.php to dequeue the style:
function dequeue_google_fonts() { wp_dequeue_style( 'onepress-fonts' ); } add_action( 'wp_enqueue_style', 'dequeue_google_fonts', 20);But it isn’t working? Could you tell me what I’m doing wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Dequeue Google Fonts’ is closed to new replies.
