Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1240477
    instadesign
    Participant

    Hi,

    I’m working on a site currently at https://www.regather.info/ that should only be using two fonts, Oswald and PT Sans. When I run tests on GTmetrix I’m seeing this in the YSlow report:

    There are 5 static components without a far-future expiration date.
    
    https://fonts.googleapis.com/css?family=Open+Sans%3A300%2C400%2C600%2C700%2C800
    https://fonts.googleapis.com/css?family=Raleway%3A100%2C200%2C300%2C400%2C500%2C600%2C700%2C800%2C900
    https://fonts.googleapis.com/css?family=Droid+Serif%3A400%2C700
    https://fonts.googleapis.com/css?family=Oswald%3A%2C300%2C400%2C700
    https://fonts.googleapis.com/css?family=PT+Sans%3A400%2C400italic%2C700%2C700italic%7COswald%3A400%2C700&subset=latin%2Clatin-ext

    Basically there’s 4 fonts there that I don’t want to load at all.

    I searched in the forum here and have added this to my funcitons.php:

    function x_remove_google_fonts(){
      wp_dequeue_style( 'x-font-custom' );
      wp_dequeue_style( 'x-font-standard' );
    }
    add_action( 'wp_enqueue_scripts', 'x_remove_google_fonts', 100 );

    However this seems to have had no effect. Can you advise how I can go about removing these requests?

    Thanks,

    Henry

    #1240602
    Christian
    Moderator

    Hey Henry,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thanks.

    #1240717
    instadesign
    Participant
    This reply has been marked as private.
    #1240866
    Christian
    Moderator

    I see you have Google Fonts selected in Typography. Please don’t use Google Fonts there. Also check other plugins that might be using Google Fonts.

    Thanks.

    #1240968
    instadesign
    Participant

    Hi Christian,

    But I do want to use Oswald and PT Sans which are Google Fonts, so should I download those and serve them myself in that case?

    Thanks,

    Henry

    #1241178
    Rupok
    Member

    Hi Henry,

    These two fonts will be loaded by theme theme for heading and body if you set them from Customzie > Typography. So no other font should be loaded unless a plugin adding them.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1240477 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>