• Resolved Heather Wilkins



    We have a client’s site who is loading Google fonts from Web Stories on pages that are not Web Stories pages. Not great for site speed or GDPR.

    The client is going to switch the Web Stories over to a local font but for now, we’re wondering if you have a snippet would could use to disable the loading of all Google fonts from the plugin?


    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @halounsbury thanks for getting in touch. The Web Stories plugin does not randomly add Google Fonts on anything else other than stories.

    If you are seeing Google Fonts on pages like https://www.lastingredient.com/frozen-vegetable-stir-fry/ it is unlikely that the Web Stories plugin is doing this. To check if another plugin you are using could be causing this then follow the steps below:

    Use the Health Check & Troubleshooting plugin and enable its troubleshooting mode. This mode disables active plugins and switches to a default theme safely because it only affects the experience of the logged-in user.

    • Please enable the Web Stories plugin and let me know if you see the Google fonts on your page.
    • Enable plugins and your theme one by one in this mode may help pinpoint what could be adding the fonts.
    • Note you can disable troubleshooting mode from the plugins page.

    These steps will not affect what a user to your site will see while testing this. Let me know how you get on here and if you have any questions.

    Thread Starter Heather Wilkins


    I tested disabling the Web Stories plugin only and the Roboto fonts (which are being used by the Web Stories plugin templates) stopped loading on this page. That seems fairly indicative to me.

    For users concerned about Google fonts loading related to the recent German GDRP issues and Google fonts ruling, it might not be a bad option to have a snippet to disable Google font loading for users anyway as a “quick fix”. Some users of the plugin have 500 or more Web Stories. Forcing them to set a custom font in the plugin and then edit every one of the Web Stories slide-by-slide to change the font settings seems like not a great solution.

    So, it would be very nice if you could provide a snippet to drop in that would disable Google fonts from the plugin site-wide. Our client doesn’t want the Google fonts on the Web Stories currently either.

    Hi there Heather,

    Thanks for following up. We’re not aware of this happening with other users and certainly don’t intend to be forcing code to load outside of Web Stories, so we definitely want to dig further here to see what’s going on.

    Would you mind sharing a non-Web Stories link where you’re seeing Google Fonts load? I don’t see them on https://www.lastingredient.com/frozen-vegetable-stir-fry/.

    Thread Starter Heather Wilkins


    Hi Bethany,

    I’ve figured it out. I was brainstorming what might cause the fonts to load across the site when they shouldn’t be and thought the WP Rocket Google font optimization feature might be the issue and it turns out it is.

    Here’s the Network panel listing all fonts loading on the above link with Web Stories and the WP Rocket Optimize Google Fonts feature enabled. You can see Roboto and Work Sans are being loaded.

    -> https://pasteboard.co/DcEPnkqyDDWk.jpg

    Now here’s when I use the WP Rocket “kill switch” ?nowprocket. You can see that it’s no longer loading the Roboto or Work Sans fonts. (It’s loading Sans Display but that seems to be from a different source.)

    -> https://pasteboard.co/zSuuok8Va8yb.jpg

    And then finally, I disabled the WP Rocket Google font optimization using a plugin they have, and we can see that Roboto is not loading and once again, only Sans Display.

    -> https://pasteboard.co/uShd3fLeV4Bt.jpg

    So, it appears to be an issue of the WP Rocket Optimize Google Fonts feature, so I will contact their support.

    It would still be nice to have a snippet or setting in the plugin to disable Google font loading totally, even on the Web Stories themselves.


    Glad to hear you were able to figure it out, Heather!

    It would still be nice to have a snippet or setting in the plugin to disable Google font loading totally, even on the Web Stories themselves.

    Since Web Stories exclusively uses Google Fonts, no fonts would be available if we were to give users the option to turn them off completely. Would your intention be to use only custom fonts on Web Stories, as added in Stories > Settings?

    Thread Starter Heather Wilkins


    Yes, if a user doesn’t want Google fonts on their site, since there is the custom font option, they could use that.

    Or you could add some system fonts or web-safe fonts to the font options. That would be a useful alternative for users who don’t want a custom font or Google fonts.

    Hi @halounsbury thanks for all the useful information and suggestions. We have created an enhancement request for this which you can find and follow here for future updates: https://github.com/GoogleForCreators/web-stories-wp/issues/11305.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable Google Fonts with Snippet’ is closed to new replies.