admin管理员组

文章数量:1279181

I'm currently using Zeen theme and a couple of other plugins. I've checked all the settings of the plugins and I've disabled all the voices about Google Font.

Now, my theme loads a font via CSS but, checking my GTMetrix the site load more than 10 .woff fonts from fonts.gstatic .

At the moment I'm delaying the load of the fonts via this JS script

<script type="text/javascript">
    WebFontConfig = {
        google: { families: [ 'Playfair+Display:700,italic,400|Open+Sans:400,700|Montserrat:400,700' ] }
    };

    (function() {
        var wf = document.createElement('script');
        wf.src = '.js';
        wf.type = 'text/javascript';
        wf.async = 'true';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(wf, s);
    })();
</script>

Is there a way to find out which plugin are loading the fonts or a PHP function to insert in the function.php to block the loading of fonts from fonts.gstatic?

I'm currently using Zeen theme and a couple of other plugins. I've checked all the settings of the plugins and I've disabled all the voices about Google Font.

Now, my theme loads a font via CSS but, checking my GTMetrix the site load more than 10 .woff fonts from fonts.gstatic .

At the moment I'm delaying the load of the fonts via this JS script

<script type="text/javascript">
    WebFontConfig = {
        google: { families: [ 'Playfair+Display:700,italic,400|Open+Sans:400,700|Montserrat:400,700' ] }
    };

    (function() {
        var wf = document.createElement('script');
        wf.src = 'https://ajax.googleapis/ajax/libs/webfont/1/webfont.js';
        wf.type = 'text/javascript';
        wf.async = 'true';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(wf, s);
    })();
</script>

Is there a way to find out which plugin are loading the fonts or a PHP function to insert in the function.php to block the loading of fonts from fonts.gstatic?

Share Improve this question asked Apr 15, 2019 at 19:04 NicoCaldoNicoCaldo 1472 silver badges9 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

Zeen theme has a Typography section where it loads all the fonts

This plugin will help you find the plugins or themes that might be calling this up. gstatic with recaptcha was driving me crazy. fonts were a secondary problem. (I discovered that using Google Sitekit to connect google analytics, adsense, Page tools etc, was the culprit/problem).

Google's own plugin was sabotaging my speed and score on Google Pagespeed Insights.

https://wordpress/plugins/string-locator/

本文标签: How find what plugins load google Font and block it