Disabling Google Webfonts

  • Mod

    Kenneth John Odle

    #7901

    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.

    Anonymous

    #39764

    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.

    Mod

    Kenneth John Odle

    #39765

    Thanks, Josh. I’ll keep playing with it too.

    Anonymous

    #39766

    remove_action( 'wp_head', 'graphene_webfont_script' );

    It’s an action not filler. Same for admin head.

    Sent from mobile.

    Anonymous

    #39767

    Hey Prasanna. Been a while 🙂

    That’s not working either… already tried that.

    Anonymous

    #39768

    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!

    Anonymous

    #39769

    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,

    XyPvnXU.png

    After,

    1MfgTfV.png

    Mod

    Kenneth John Odle

    #39770

    Changing to remove_action didn’t work, but adding the priority parameter did. Thanks, guys!

    Anonymous

    #39771

    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.