[Resolved] Disable google fonts

Home Forums Support [Resolved] Disable google fonts

Home Forums Support Disable google fonts

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1018052
    Olaf

    Hi.

    I’ve changed the fonts via Customizer to browser fonts. body = Tahoma, everything else inherit.

    But still the google fonts are loaded … even if I add the following code to the functions.php:

    add_action( ‘wp_enqueue_scripts’,’tu_remove_google_fonts’, 10 );
    function tu_remove_google_fonts() {
    wp_dequeue_style( ‘generate-fonts’ );
    }

    What can I do to stop it? Many thanks in advance.

    #1018069
    David
    Staff
    Customer Support

    Hi there,

    just checked your site and i cannot see any google font requests. Maybe its cached in your browser?

    #1018323
    Olaf

    Hi David

    thanks for the quick answer.

    When I check the website with https://tools.pingdom.com it says that Google sends a request (fonts.googleapis.com). The same result in Developer Tools (Chrome).

    I’ve deleted my browser cache, checked all plugins and integrated the following code:

    add_action( ‘admin_init’, ‘tu_remove_google_fonts’ );
    function tu_remove_google_fonts() {
    add_filter( ‘generate_google_fonts_array’, ‘__return_false’ );
    }

    Maybe you have another idea where the request is hiding!? πŸ˜‰

    #1018419
    David
    Staff
    Customer Support

    GT Metrix for me has no Google fonts. Pingdom does which may mean its getting a CDN Cacheed file.
    Does your server use CloudFlare ? If so give that a clean.

    #1019596
    Olaf

    Hi David

    GT Metrix finds the request, too. πŸ˜‰

    Could you please have a look at the tab “Waterfall”?

    You’ll find “fonts.googleapis.com” at the lower part. The font is “Montserrat”.

    I don’t use CloudFlare.

    —–

    And I have a new problem: When you load the website for the first time, you can only see the bottom half of the logo. After you reload the page, the logo is in its desired position (mobile & Desktop, Chrome) … but that seemingly doesn’t work in FF. Strange, isn’t it?

    I use Autoptimize and have cleared the cache.

    #1019745
    David
    Staff
    Customer Support

    Looks like the Pop Up maker is calling the google font.
    You have some CSS that is moving the logo position up ?

    #1019815
    Olaf

    Hi.

    And thanks again for the fast answer.

    Problem 1 solved!!! It was the Pop Up Maker … Thanks for the indication.

    “You have some CSS that is moving the logo position up ?”

    If we have than it was not on purpose. πŸ™

    #1019854
    David
    Staff
    Customer Support

    Check in the Customizer > Additional CSS – remove this:

    .site-branding,
    .site-logo {
    	position: absolute;
    	left: 50%;
    	-webkit-transform: translateX(-50%);
    	transform: translateX(-50%);
    	z-index: 200;
    }
    #1019976
    Olaf

    Hi David

    that works. Thanks again.

    But now another – maybe my last – question: πŸ˜‰

    How can I now center the logo again?

    #1020075
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try this CSS:

    .site-logo {
        margin-left: auto;
        margin-right: auto;
    }

    Let me know πŸ™‚

    #1020141
    Olaf

    Yeah. Works. Thanks a lot! πŸ™‚

    #1020586
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

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