Site logo

[Support request] Removing Google Font from WordPress site’s theme

Home Forums Support [Support request] Removing Google Font from WordPress site’s theme

Home Forums Support Removing Google Font from WordPress site’s theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2524197
    shlomo

    Our hosting company suggests that we need to remove the Google Fonts on my site’s theme to increase my site’s speed. You can refer to this link:
    https://wordpress.ezoic.com/how-to-remove-google-fonts-from-your-wordpress-site/

    Well, I already tried the option to add a wp_enqueue_style() function on functions.php, but it seems not working up until now. So, I am thinking maybe I’ve added a wrong $handle of the GeneratePress theme.

    I want to know what is the exact $handle that I can use in order to make the wp_enqueue_style() function work for our site while using your theme or if there’s simple workaround to this.

    This time, this is the code I’ve added on functions.php:

    /* TN Dequeue Styles – Remove Google Fonts from GeneratePress Theme*/

    add_action( ‘wp_print_styles’, ‘tn_dequeue_generate_fonts_style’ );
    function tn_dequeue_generatepress_fonts_style() {
    wp_dequeue_style( ‘generatepress-fonts’ );
    }

    Will wait for your response. Thanks!

    #2524366
    David
    Staff
    Customer Support

    Hi there,

    ignore that guide.

    Just go to the Customizer > Typography, and remove any Google Fonts you have set, and replace them with a system stack.

    If you want to use google fonts but load them locally, which will remove the slower google font API, then follow this guide:

    https://docs.generatepress.com/article/adding-local-fonts/

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