• Resolved optimisto

    (@optimisto)


    I love the theme but it needs more speed – Pagespeed reports 5 blocking CSS resources loading in the header – how can I get rid of them? Where do we use these fonts anyway? I’d rather use one font everywhere.

    wp-content/themes/gk-portfolio/css/A.normalize.css
    
    fonts.googleapis.com/css?family=Cookie
    
    fonts.googleapis.com/css?family=Raleway%3A300%2C400%2C700
    
    and two instances of:
    wp-content/themes/gk-portfolio/css/A.font.awesome.css
Viewing 7 replies - 1 through 7 (of 7 total)
  • Theme Author GavickPro

    (@gavickpro)

    Sorry but this kind of optimization is a task for plugin or custom CSS work.

    Thread Starter optimisto

    (@optimisto)

    Fair enough, Gavick – where should I edit and what so that only one font is loaded?

    Theme Author GavickPro

    (@gavickpro)

    In the theme customizer you can specify used fonts. Of course font-awesome will be always loaded as it is responsible for the icons in the theme.

    Thread Starter optimisto

    (@optimisto)

    Ah, ok. By icons – you mean social icons and the icons for media, like photo and movie? If it’s only that – I can live without them – how do I remove that font from loading?

    Gavick, I have specified in the customizer to use only the OpenSans font but the theme still loads these extra two (Cookie, Raleway). What code should I edit in order to prevent them for being loaded?

    I like your theme, it’s very good for a mobile (responsive) gallery, but the images from the gallery slow it down enough, so I’m trying to remove everything else that might slow it down. I hope you can help me with that.

    Another idea for this theme is probably “lazy loading” for the photos.

    Theme Author GavickPro

    (@gavickpro)

    All icons used in the theme comes from this icon set (also i.e. the tag icon), please also remember that after removing the iconset you will get instead of icons the letters or strange unicode characters.

    The font-awesome is added by the following line:

    // Font Awesome
    wp_enqueue_style('portfolio-font-awesome', get_template_directory_uri() . '/css/font.awesome.css', false, '4.0.3');

    in the functions.php file.

    Regarding the other issue – are you sure that you have correctly saved the theme settings? Because I’ve checked it and if I specify the Open Sans font for the page element in both groups any other fonts are not loaded. The only adjustment for the next version is detecting the same fonts in different groups which will reduce number of request (because now two link elements are generated).

    Thread Starter optimisto

    (@optimisto)

    Thank you Gavick, I already found and commented out the two fonts in functions.php and they don’t preload now. I changed to Helvetica and now no fonts are being preloaded (except Font-awesome). As for Font-awesome – I understand that I’d have to keep it because removing it and replacing all icons with images would take too much meddling with everything. I think tho that speed-wise it is better to have the few icons as images and not preload a whole font. Also I believe responsive themes should be as slim and as fast as possible and even ignore their minor incompatibilities with older browsers, who are becoming a negligible percentage of all users.

    Thanks again for your help, Gavick and keep up the good work! ??

    Theme Author GavickPro

    (@gavickpro)

    @optimisto – we will try to add few optimizations to the theme in the next version (v.1.3.0) ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Pagespeed – 5 blocking CSS resources?’ is closed to new replies.