How to disable google fonts?

Hi,
I’m using this theme for a while and I realize that the load speed of my site is very slow. When I went to Web Developer Mode and I saw that there’s an error loading google font Open Sans. I’m in China and anything about Google is not working here. So I wonder a way to figure this out.
thanks a lot.

I have the same problem, but from a different angle! I want to use the Sydney Theme in China!

I’m using the Sydney Pro theme at a miroc-site to create transparency for information distribute teams. The challenge is we have teams in China, where there is a No Google policy. This make the site not load properly, or rather not at all. Access is no problem, rather content is not loaded due to requests to googleapis.com

Is there an easy way to disable Google Fonts or other Googleapis.com calls or manage that?

Solving this would make Sydney Pro a great template in China as well. 1 of 5 Internet users are currently Chinese :expressionless:

Thank you in advance!

Chris

Hello Chris,

Add this code to your child theme’s functions.php file.

    function sydney_child_remove_google_fonts() {

       // Remove Google Fonts from theme
       wp_dequeue_style( 'sydney-fonts' );

       // Disable Google Map
       wp_dequeue_script( 'sydney-gmaps-api');

    }
    add_action( 'wp_enqueue_scripts', 'sydney_child_remove_google_fonts', 999 ); 

If you aren’t running a child theme, alternatively you can use a functionality plugin like Code Snippets.

Regards,
Kharis

1 Like