Support » Plugin: Autoptimize » Cannot disable Google fonts

  • Resolved jonnylander

    (@jonnylander)


    Hi,

    I want to disable Google Fonts on my page and fortunately I found this plugin.
    I checked the box to remove Google Fonts and… nothing happens.

    I checked my site with https://webbkoll.dataskydd.net/en . There is still a connection to fonts.googleapis.com

    What can I do?

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    AO is only able to remove Google Fonts if they are loaded using the default manner (linked stylesheets). If they are loaded differently (e.g. using JS), then AO will not stop that.

    but if you share your URL @jonnylander I can have a quick look to see what is happening?

    frank

    Thanks for the quick reply!
    I searched the style.css and could not find any URL to google.
    I think I found the code in the functions.php

    Theme is https://de.wordpress.org/themes/square/
    URL is http://www.hardtschule.de

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm, the only font being loaded seems to be

    
    <link rel='stylesheet' id='square-fonts-css'  href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700|Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,latin-ext' type='text/css' media='all' />

    and AO _should_ be able to remove that. if you can re-enable AO I’ll be happy to review.

    frank

    Right! It’s just Roboto!

    AO is still enabled!

    I just enabled the following checkboxes:
    – Remove emojis
    – Remove Google fonts

    Nothing else!
    I’m pleased that you want to help me!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ah, but you need to have “optimize CSS” active for the google fonts to be remove and “optimize JS” for emoji’s to be removed. I might have to make that more clear!

    • This reply was modified 1 month, 1 week ago by  Optimizing Matters. Reason: emojis should work

    Ah, something’s happening now… fonts are removed.
    Unfortunately that setting crashes the whole theme-layout. It’s a pity.

    πŸ˜‰

    Seems that I have to search for another solution…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, either have a look at the AO FAQ for info on troubleshooting (e.g. adding wp-content/themes/square/ to the exclusion list would exclude all of your theme files from CSS optimization) or try the 2.4 beta which can remove google fonts if you just enable “optimize HTML”.

    BAM!
    Great Support!
    Works fine now.

    I excluded the whole “wp-content”.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I excluded the whole β€œwp-content”.

    smart πŸ™‚

    BAM!
    Great Support!
    Works fine now.

    you’re welcome, feel free to review Autoptimize and support here! πŸ™‚

    Hey… this topic is marked as solved, but I have another question and don’t want to open a new topic.

    Above your worte:
    “AO is only able to remove Google Fonts if they are loaded using the default manner (linked stylesheets). If they are loaded differently (e.g. using JS), then AO will not stop that.”

    I tried now to use this great plugin on another page with the same settings. But this time Google Fonts are still loading. I don’t understand anything about coding.

    Maybe you can give me a short reply if the plugin works with following website?
    https://www.cvjm-ebersbach.de

    Cheers
    J.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, there are 2 google font calls, one that AO can remove (stylesheet with id=”redux-google-fonts-evl_options-css”) and one that AO cannot remove, which is loaded from inside wp-content/plugins/download-manager/assets/css/front.css?ver=4.9.5. Maybe ask the “download manager” developer how prevent that call?

    enjoy the weekend!
    frank

    Thanks a lot!
    Great support… thumbs up!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome @jonnylander, feel free to leave a review of the plugin and support here! πŸ™‚

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