• delecroixfr

    (@delecroixfr)


    I will like to reduce the loading page, moreover I have customer in China, and loading google font from google server can be blocked. So I will like to know hos to host google font by using proteo?

Viewing 1 replies (of 1 total)
  • Theme Author YITHEMES

    (@yithemes)

    Hi there,
    you can globally disable proteo google font styles adding this snippet of php code in your child theme functions.php file

    /**
     * Disable google font stylesheet
     *
     * @return void
     */
    function yith_proteo_customer_remove_google_fonts() {
    	wp_dequeue_style( 'yith-proteo-google-font' );
    	wp_dequeue_style( 'yith-proteo-custom-google-fonts' );
    }
    add_action( 'wp_enqueue_scripts', 'yith_proteo_customer_remove_google_fonts', 100 );

    To host locally your webfonts, like also google fonts, you can download theme and place the files in a folder of your child theme. Then you can simply load them throught the child theme style.css or via Additional CSS code.
    I’m also pointing you to this webpage which give a nice example: https://wplift.com/how-to-host-google-fonts-locally-on-wordpress
    The part of the article about disabling google fonts on your theme is already covedere with the PHP code above.

Viewing 1 replies (of 1 total)
  • The topic ‘Host locally Google font’ is closed to new replies.