[Support request] Multiple Google Fonts Loaded

Home Forums Support [Support request] Multiple Google Fonts Loaded

Home Forums Support Multiple Google Fonts Loaded

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

    Hi,

    I’m trying to fix some WC3 Validation errors as part of an Accessibility Audit. I’m using the script below to remove pipes from the Google Font URLs:

    add_filter( 'generate_typography_google_fonts','tu_convert_font_pipes', 100 );
    function tu_convert_font_pipes( $google_fonts ) {
    	return str_replace( '|', '%7C', $google_fonts );
    }

    This appears to have worked for the fonts loaded by GP, but there seems to be something else also loading Open Sans and Lato which still has the pipes in the URLs. Elementor is used on the site but I have disabled default fonts, so that shouldn’t be loading anything.

    Is there any way of tracking down what plugin may be loading these duplicate fonts? I’ve tried using browser inspector and looking at the source code but it doesn’t give me any clues.

    Any help appreciated.

    #1380514
    David
    Staff
    Customer Support

    Hi there,

    easiest way is to disable all other plugins and check to see of the fonts are removed, then re-enable plugins one by one – checking to see if one of them is adding it.

    Also check for any functions you may have in a child theme or GP Hooks.

    #1380546
    Andy

    Problem is it’s a live site so can’t really disable plugins. I know theres that troubleshooting plugin that allows you to only disable stuff for logged-in users, not sure if that would work though as I need to check the front-end for the Google font code?.

    #1380902
    David
    Staff
    Customer Support

    Does your host provide a Staging site option ? this will allow you to make those changes without effecting the live site.

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