Home>Support>Trying to stop @import of fonts.googleapis.com

Trying to stop @import of fonts.googleapis.com

By rocket, 7 years ago. Last reply by Alex S, 7 years ago.

Hi.

I am using the Google web font loader to defer/asynchronously load my fonts to increase page load time.

I’ve included the script to do this into the footer of my site

Seems to be working fine on mobile but not on desktop. When I look at the source code for my page, I still see the following:
@import url(https://fonts.googleapis.com/css?family=Italiana);

My question is how to I stop the North theme from running this @import?

Any help much appreciated.

Richard.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 3 months ago Alex S
    Hi, I Work Here

    Hi Rocket

    Please install Code Snippets and then navigate to WP AdminSnippetsAdd New and title the snippet:

    SiteOrigin Settings – Remove Google Fonts

    Then add the following PHP:

    function siteorigin_settings_remove_google() {
    	wp_dequeue_style( 'siteorigin-google-web-fonts' );
    }
    add_action( 'wp_enqueue_scripts', 'siteorigin_settings_remove_google', 20 );
    

    Clcik Save Changes and Activate. How does that look? If it’s still present, please be sure to clear your cache and if that doesn’t help, do you have a public URL where we can take a look at what’s going on?

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More