No announcement yet.

Dynamik Style Sheet Load Order When Working with WooCommerce

  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamik Style Sheet Load Order When Working with WooCommerce

    Hi there,

    I'm currently working on a new eCoomerce site using WooCommerce, Genesis and Dynamik WB. I've been using Genesis and DWB a few months but it's the first WooCommerce project I tackle with them.

    The problem I'm running into is that I often need to use !important or overly specific (and unwieldy) selectors to override the built-in WooCommerce styles (same would be true with Gravity Forms). In the past when I used other themes (mostly iThemes Builder and Woo Canvas and other Woo themes), I either loaded my own separate custom stylesheet (Builder) or used the built-in Woo custom.css in my child theme. In Builder's case, I modified the hook priority to load my child theme's custom styles later than both the parent theme's CSS, WooCommerce CSS and most plugins'. Woo themes load a child theme's custom.css very late in the head by default.

    Now with Genesis, I came accross this by Carrie Dills:

    That method (code in that article or the plugin she created later) moves a Genesis child theme's style.css further down the head after the WooCommerce styles by first unenqueuing it then re-enqueuing it with a lower priority. But Dynamik doesn't use style.css (well, it's there but empty aside from the comments and is not loaded in the site), it uses a minified file combining its generated styles and user custom styles into wp-content/uploads/dynamik-gen/theme/dynamik-min.css

    That file is loaded way before WooCommerce and most other plugins. I'd love to move it further down as Carrie does in that article and I did before using Genesis/DWB.

    So, I was wondering if Dynamik has it's own hook or other method to do this as Carrie's code is not working on anything other than the child theme's main CSS file (style.css).

    Last edited by webfocusdesign; 01-05-2014, 05:38 PM.

  • #2
    Is that what you mean?:


    • #3
      Yes! Thank you SiGa!

      My search had not turned this up but it works perfectly. Places the minified Dynamik style sheet right after the WooCommerce style sheets which will make overriding them far easier from Dynamik's custom CSS.



      • #4
        I remembered I saw that just lately - thanks handed over to Hermie and Eric. Glad it helped.