• Is there a function I can make (or reference – I didn’t see anything on the installation page) to load MyCustomCSS after WooThemes CSS?

    <?php
    wp_head();
    woo_head();
    ?>

    I’m new to this, but I’m assuming MyCustomCSS loads in the wp_head() function and naturally WooTheme’s CSS loads thereafter with the woo_head() function. Therefore, any theme CSS I’d like to override have to be marked with “!important” which is pretty cringe-worthy. Is there a way to keep MyCustomCSS from loading under wp_head and instead load after woo_head?

    Thanks!

    https://www.ads-software.com/plugins/my-custom-css/

Viewing 2 replies - 1 through 2 (of 2 total)
  • @redcore – I feel your pain. WooThemes wants you to add custom styles to custom.css in the parent theme – but what if you are redistributing your child theme? Here’s what I did to solve the issue (there may be a cleaner fix out there):

    1. Create a child theme
    2. Create a functions.php file in your child theme
    3. create a CSS file in your child theme at /css/custom.css
    4. add the following code to functions.php: `add_action(‘woo_head’, ‘add_custom_styles’, 99);
      function add_custom_styles() {
      wp_enqueue_style( ‘custom-styles’, get_stylesheet_directory_uri() . ‘/css/custom.css’ );
      }`

    I like your fix better than mine, which was to simply use the !important keyword in my CSS like this:

    #navigation, #footer {
        background-color: rgba(206, 4, 10, 0.9) !important;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WooThemes CSS loads last’ is closed to new replies.