Support » Theme: evolve » Style.css Not Working in Child Theme

  • I created the child theme correctly, but the style.css file is not overriding the parent theme. I created a footer.php file and that works perfectly.

    I followed steps from another post:

    You create a folder for your child theme and put in two files, one called “style.css” and one called “base.css.”

    You create the style.css as usual regarding your child theme information at the top. But when you come to the point where you would type “@import url(‘../evolve/style.css’);” instead you copy all the “@import” information from the style.css in the original EvoLve theme. Then delete or comment out *the one that imports the “base.css” file and type “@import url(‘base.css’);” instead.

    Then copy the “base.css” file from the original EvoLve theme, which is found in “evolve/library/media/css/base.css,” and copy it into your child theme.

    Then you can change the base.css theme however you want to change the look of the site.

    I hope that is clear enough.

    *it says “@import url( ‘library/media/css/base.css’ );”

    Also, I realized you have to add “../evolve/” to the beginning of the other “@import” paths; for example, “@import url( ‘../evolve/library/media/layouts/2col-r.css’ );”.

    There are also some layout style commmands that should also be copied.

    It didn’t work. I tried this:

    To load a style.css of the child theme (instead of the one of the parent theme, which would get loaded by the @import in the child’s style.css) try to add this to functions.php of the child theme:

    function c_evolve_media() {
    	wp_dequeue_style('maincss'); //remove the call of the parent's style.css// 
    	wp_register_style('cmaincss', get_stylesheet_directory_uri() . '/style.css', false);
    	if( !is_admin() ) wp_enqueue_style('cmaincss');

    add_action( ‘init’, ‘c_evolve_media’, 20 ); // c_evolve_media() loads child style.css
    This should also enable any @import rules you might have in the child’s style.css.

    But, like she said, it completely changes my entire website. I’ve tried everything and none of it works.

    Evolve theme

    Thank you!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Style.css Not Working in Child Theme’ is closed to new replies.