[Resolved] Don't know why a font is loading

Home Forums Support Don't know why a font is loading

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1025468
    Whelan

    I’m testing my site with Google Pagespeed. It lists a number of render-blocking resources including the Noto Serif font (780ms). I have no idea why that font is being loaded.

    Is it something to do with it being the default editor font?
    Ref: https://github.com/WordPress/gutenberg/issues/12611

    Other possibilities:

    I’ve checked all my custom css, inline CSS and Customiser > Typography settings and I can’t find Noto Serif anywhere.

    I also do not think it is included in a plugin.

    #1025476
    Leo
    Staff
    Customer Support

    Hi there,

    Looks like it’s the editor font:
    https://www.screencast.com/t/J2g4Bs8D

    Hope this helps πŸ™‚

    #1025528
    Whelan

    OK great, how do I stop it loading?

    #1025532
    Leo
    Staff
    Customer Support

    You’d need to check with WordPress support to see if that’s possible without breaking the editor.

    #1062881
    Whelan

    Hello again

    This is still not resolved and doesn’t make sense to me. To clarify, I am testing the page speed for the front-end – for visitors to the site who are NOT LOGGED in.

    Why is it accessing resources that are only used in the back-end?

    This does not happen with other themes. There is something about this specific config that is causing this – possibly related to the Generatepress theme… and I’d really appreciate your help in diagnosing it.

    Click to view screenshot

    I’m conducting the tests in Private Browsing mode with browser cache and cookies cleared when I am not logged in to the site. So why is it loading back-end resources?

    #1062892
    David
    Staff
    Customer Support

    Hi there,

    are you using the Classic Editor plugin?

    #1062899
    Whelan

    Hi David

    No

    #1062904
    David
    Staff
    Customer Support

    I know the Classic editor enqueues it on the front end, so likelihood it is another plugin, can you try disabling each one to see if thats the case

    #1062910
    Whelan

    Thanks I tried that but it was inconclusive. Will try again and be more thorough. I’m contacting you on the off-chance that it has something to do with code I added to my child theme functions.php

    i.e. this line: “add_theme_support( ‘editor-styles’ );”

    I added that quite a while ago to make the editor more WYSIWYG (as well as Admin CSS) but I have not explicitly selected or specified “Noto Serif” anywhere.

    Here’s my full functions.php code:

    <?php
    /**
     * GeneratePress child theme functions and definitions.
     *
     * Add your custom PHP in this file. 
     * Only edit this file if you have direct access to it on your server (to fix errors if they happen).
     */
    
    function generatepress_child_enqueue_scripts() {
    	if ( is_rtl() ) {
    		wp_enqueue_style( 'generatepress-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' );
    	}
    }
    add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts', 100 );
    
    add_theme_support( 'editor-styles' );
    
    // Make "quote" the default format for my custom quote post type.
    add_filter( 'option_default_post_format', 'default_to_quote_post_format' );
      
    function default_to_quote_post_format( $format ) {
        global $post_type;
        return ( 'quotes' === $post_type ? 'quotes' : $format );
    }
    
    // https://docs.generatepress.com/article/generate_smooth_scroll_elements/
    add_filter( 'generate_smooth_scroll_elements', function( $elements ) {
      $elements[] = 'a[href*="#"]';
    
    #1062912
    Whelan

    I suspect it’s related to the “Kadence Block” plugin and am speaking to the developer – I just need confirmation that it’s not a theme issue – based on the info I’ve provided.

    #1063174
    Leo
    Staff
    Customer Support

    I just need confirmation that it’s not a theme issue – based on the info I’ve provided.

    The way to determine whether it’s a theme issue or not is to disable all plugins (not just some of them) except GP Premium and remove all of your custom function.

    If the issue still exist, then it might be something to do with the theme. If it doesn’t exist then the issue is not theme related.

    #1063376
    Whelan

    Thanks Leo

    It’s a live Woocommerce site selling round the clock, so I have to clone it to fully disable everything – was hoping you might spot something obvious before I have to do that…

    Guess not. Thanks anyway, will close this topic now

    #1063415
    Leo
    Staff
    Customer Support

    Sounds good.

    Let us know when you are able to go through the debugging tips and need another look πŸ™‚

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