Home Forums Arnold WordPress Theme Disable Google Fonts

This topic contains 3 replies, has 2 voices, and was last updated by  BWSM 2 months, 4 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14321

    tomasz_kudlej
    Participant

    Hi there,
    i’m using my own webfont (@fontface in my child-theme). So there was no need to import google fonts in my template.
    But the theme is loading four google fonts by default (Poppins, Playfair Display, Libre Baskerville, Kreon). How can I disable these fonts to optimize my page speed?

    #14331

    BWSM
    Keymaster

    Hi,

    Please add the codes on the functions.php of child-theme(should be like):

    wp_enqueue_style('google-fonts-Poppins');
    wp_enqueue_style('google-fonts-Playfair+Display+SC');
    wp_enqueue_style('google-fonts-Libre+Baskerville');
    wp_enqueue_style('google-fonts-Kreon');

    Regards!

    #14336

    tomasz_kudlej
    Participant

    I added the codes but the google fonts are still loading.

    #14341

    BWSM
    Keymaster

    Very sorry, is my mistake!
    The codes should be:

    wp_dequeue_style('google-fonts-Poppins');
    wp_dequeue_style('google-fonts-Playfair+Display+SC');
    wp_dequeue_style('google-fonts-Libre+Baskerville');
    wp_dequeue_style('google-fonts-Kreon');
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.