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

    I’m trying to prevent Google fonts from loading.

    This code is in my header and I don’t know where it comes from:

    if( allow_continue )
    					{
    						var f = document.createElement('link');
    					
    						f.type 	= 'text/css';
    						f.rel 	= 'stylesheet';
    						f.href 	= '//fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700%7COpen+Sans:400,600';
    						f.id 	= 'avia-google-webfont';
    
    						document.getElementsByTagName('head')[0].appendChild(f);
    					}
    				})();
    

    I have read of other solutions to disable Roboto from Google Maps, however, I have disabled Google Maps and my issue is with Open Sans and Open Sans Condensed.

    Thank you
    Jon

    #1305348

    Hi jonhedges,

    Can you try adding this code in functions.php (I suggest to put it in the child theme):

    add_filter( 'avf_output_google_webfonts_script', 'my_output_google_webfonts_script', 10, 1 );
    
    function my_output_google_webfonts_script( $activate )
    {
    	return false;
    }

    Best regards,
    Nikko

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