• Resolved boxcandy

    (@boxcandy)


    Hi, I made a child theme and activated it, but when I make changes to styles.css nothing happens. Am i missing something?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author zenoven

    (@zenoven)

    Hi @boxcandy,

    so what have you done to change the style.css ?

    Thread Starter boxcandy

    (@boxcandy)

    I can delete every line of the child theme style sheet and it has NO effect. There must be something wrong with the link the style sheet

    the theme seems to enqueue the parent theme’s style.css regardless whether you use a child theme;

    you could add a functions.php to your child theme with the necessary code to enqueue your child theme’s style.css;

    example of new functions.php:

    <?php
     function zAliveChild_scriptsAndStyles() {
        wp_enqueue_style( 'zAliveChild-style', get_stylesheet_directory_uri() . '/style.css', array( 'bootstrap','bootstrap-responsive' ) );
    	}
    
    add_action( 'wp_enqueue_scripts', 'zAliveChild_scriptsAndStyles', 20 );
    
    ?>
    Theme Author zenoven

    (@zenoven)

    Hi all,

    I’m checking this issue now and it seems to be a bug while loading the style sheet file.

    Theme Author zenoven

    (@zenoven)

    bug located,

    in version 1.1.10 , functions.php on line 439

    function zAlive_scriptsAndStyles(){

    wp_enqueue_style( ‘zAlive-style’, get_template_directory_uri() . ‘/style.css’, array( ‘bootstrap’,’bootstrap-responsive’ ) );

    }

    the second parameter get_template_directory_uri() . ‘/style.css’ does not work for child theme,I replaced it with get_stylesheet_uri() and it works fine now.

    Thanks @boxcandy and @alchymyth !

    Thread Starter boxcandy

    (@boxcandy)

    Thanks for the replies guys, Zenoven I replaced the code as you suggested and it seems to be working fine now, thanks. Nice theme by the way!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to access CSS in this theme?’ is closed to new replies.