• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Site Optimisation – Where to load style.css

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Site Optimisation – Where to load style.css

This topic is: not resolved

Tagged: Optimisation

  • This topic has 1 reply, 1 voice, and was last updated 7 years, 8 months ago by yashitamittal11.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 9, 2017 at 12:38 am #211235
    yashitamittal11
    Member

    Hi

    1. I am optimising my website MG Tools.
    According to Page Speed Insights, I should move render blocking resources like style.css below the fold content. So I have moved some stylesheets in the footer.
    But I cannot move style.css in the footer other wise the page doesn't display properly for a few seconds on loading.

    I am thinking of moving Woocommerce css to the footer. But if I will keep style.css in the header and woo styles in the footer, then woo styles will override my styles.
    How to make a decision in this case. Which files should I keep in the header.

    Also if I move jquery.js to the footer, the slider and menu in the header stop working.

    2. Somehow the version number from my style.css is striping off. When I View Source I cannot see the version number. Because of this caching is preventing new style.css to load. I don't remember stripping the query string anywhere. I amusing the following code to add style sheet manually but still the version no is missing

    
    remove_action( 'genesis_meta', 'genesis_load_stylesheet' );
    /**
     * Enqueue Genesis child theme style sheet at higher priority,so that it is loaded after Woocommerce and other theme css
     * 
     */
    //add_action( 'wp_enqueue_scripts', 'genesis_enqueue_main_stylesheet', 15 );
    // Save same data about the theme into a variable
    $child_my_theme_data = wp_get_theme();
    
    // Enqueue a CSS style file
    wp_enqueue_style(
    'child_style',
    get_stylesheet_directory_uri() . '/style.css',
    array(),
    $child_my_theme_data->Version
    );
    http://mgtools.in
    September 10, 2017 at 11:16 pm #211288
    yashitamittal11
    Member

    Hi

    2nd problem is solved.
    I just want insight on 1st issue.

    Thanks

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble