[Resolved] Google Fonts Showing Up in Dev Tools

Home Forums Support Google Fonts Showing Up in Dev Tools

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1325402
    Michael

    Hi guys,

    I’m having a devil of a time in removing google fonts. I am serving them locally and have included excerpts to remove Google Fonts from GP and one to include the local fonts in customizer:

    add_action( 'wp_enqueue_scripts', function() {
        wp_dequeue_style( 'generate-fonts' );
    } );
    add_filter( 'generate_typography_default_fonts', function( $fonts ) {
        $fonts[] = 'Open Sans';
        $fonts[] = 'Carrois Gothic';
    	$fonts[] = 'Ico Moon';
    
        return $fonts;
    } );
    add_action( 'admin_init', function() {
        add_filter( 'generate_google_fonts_array', '__return_empty_array' );
    } );

    If I check on a tool like GTMetrix for example the google font api doesn’t show as loading. However, when I check in Chrome dev tools it shows:

    https://www.screencast.com/t/m6GXaUIDtf8

    After clearing caches it is still being called. I have been unable to work out where this call is coming from.

    I have tried a couple of plugin options to remove as well, but none have worked.

    Please can you advise if there is something left in GP that I need to remove?

    Thanks again you for your help.

    Michael.

    #1325472
    Michael

    It turns out it was the Moz Bar creating the call for google fonts. So that’s sorted. Sorry for any confusion – hopefully if anyone else comes up against a similar issue they will find this post to save them some hours!

    #1325539
    Leo
    Staff
    Customer Support

    Glad you’ve figured out 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.