Disabling Google Webfonts
-
Mod
I have been trying to disable Google webfonts using this in a child theme:
function my_remove_filter() {
remove_filter( 'wp_head', 'graphene_webfont_script' );
remove_filter( 'admin_head-appearance_page_custom-header', 'graphene_webfont_script' );
}
add_action( 'init', 'my_remove_filter' );which I got from here. Even though that post is a year old, the theme still seems to add those functions to the same hooks.
Ideas? Working in localhost or I’d throw you a link. All plugins are disabled.
Mod
Thanks, Josh. I’ll keep playing with it too.
remove_action( 'wp_head', 'graphene_webfont_script' );
It’s an action not filler. Same for admin head.
Sent from mobile.
It is working for me.
remove_action( 'wp_head', 'graphene_webfont_script', 5 );
remove_action( 'admin_head-appearance_page_custom-header', 'graphene_webfont_script' );Hi Josh!
This should work,
function graphene_remove_webfont() {
remove_action( 'wp_head', 'graphene_webfont_script', 5 );
remove_action( 'admin_head-appearance_page_custom-header', 'graphene_webfont_script' );
}
add_action( 'init', 'graphene_remove_webfont' );Before,
After,
Mod
Changing to
remove_action
didn’t work, but adding the priority parameter did. Thanks, guys!
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.