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.
Working on it, Ken.
Weird stuff… I’ve tried everything in my bag of tricks, and can’t seem to get it.
I’ll keep ya posted.
ModThanks, 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.
Hey Prasanna. Been a while 🙂
That’s not working either… already tried that.
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,
ModChanging to
remove_action
didn’t work, but adding the priority parameter did. Thanks, guys!Ah yes, the priority parameter.
Good work, gentlemen 🙂
Viewing 9 posts - 1 through 9 (of 9 total)
- You must be logged in to reply to this topic.