Results 1 to 5 of 5

Thread: How do you make Child Theme CSS stylesheet load last (after the other stylesheets)?

  1. #1
    Thread Starter
    Veteran ejikoala's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Posts
    345
    Thanks
    6
    Thanked 19 Times in 15 Posts

    How do you make Child Theme CSS stylesheet load last (after the other stylesheets)?

    I made a Classipress child theme, however my styles don't work because they get loaded *before* the parent's styles. In order for them to override the parent styles, they must be loaded *after* the parent stylesheet is loaded.

    Please, anyone, help me fix the code so that my child's stylesheet gets loaded after the parent's. I've done literally dozens of variations of the sample at the codex and other website tutorials and no matter what I do, the child's stylesheet continues to load first.

    http://codex.wordpress.org/Function_..._enqueue_style

    PHP Code:
    function load_the_styles() {
        
    wp_enqueue_style'classipress'get_template_directory_uri() . '/style.css' );
        
    wp_enqueue_style'classipress-child'get_stylesheet_directory_uri() . '/style.css', array( 'classipress' ) );
    }

    add_action'wp_enqueue_scripts''load_the_styles' ); 
    Was this post helpful? Click the "Thanks" button below.

  2. #2
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    Veteran ejikoala's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Posts
    345
    Thanks
    6
    Thanked 19 Times in 15 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Was this post helpful? Click the "Thanks" button below.

  4. #4
    Thread Starter
    Veteran ejikoala's Avatar
    Join Date
    Sep 2009
    Location
    United States
    Posts
    345
    Thanks
    6
    Thanked 19 Times in 15 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Was this post helpful? Click the "Thanks" button below.

  5. #5
    domodomo's Avatar
    Join Date
    Jul 2010
    Location
    Japan
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: February 2nd, 2015, 04:02 PM
  2. Replies: 0
    Last Post: February 1st, 2015, 05:42 PM
  3. Replies: 2
    Last Post: March 2nd, 2014, 06:21 PM
  4. Child theme stylesheet stopped working
    By shortied in forum Vantage General Discussion (Legacy)
    Replies: 2
    Last Post: June 11th, 2013, 02:07 AM
  5. Need help with child theme/changing things that aren't in stylesheet
    By plivans in forum ClassiPress General Discussion
    Replies: 0
    Last Post: March 12th, 2013, 06:22 PM