• Hi,

    I have created a libretto child theme. However, changes made to style.css in the child theme do not take effect and only parent style.css is being used.

    However, when I make same changes in Appearance>Customise>Additional CSS, changes take effect immediately.

    I would like to use the child theme route. I have created child themes for other themes which are working perfectly.

    Could you please advise me what could be wrong.

    Since I am using a local site, I would not be able to provide you a link.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Kathryn Presner

    (@zoonini)

    @dhatul – could you please provide a link to your child theme’s functions.php and style.css files so I can take a look.

    Thread Starter dhatul

    (@dhatul)

    Hi Kathryn,

    My site is not yet online.

    Is there anyway I can send the files to you as an attachment?

    Moderator Kathryn Presner

    (@zoonini)

    It’s OK if your site isn’t yet online, but you can still upload those two files somewhere so I can see them.

    Or you can paste the contents of each file into separate Pastebins, and then link to them here: https://pastebin.com/

    Thread Starter dhatul

    (@dhatul)

    Functions.php is here https://pastebin.com/CkPNcqkU

    Style.css is here https://pastebin.com/nvancK4b

    Moderator Kathryn Presner

    (@zoonini)

    Looks like you’re using a child-theme plugin. If you need help with its setup, you can post in the plugin’s forum, as I’m not familiar with this particular plugin or what might be going awry with it.

    Or you can create a child theme manually – a plugin isn’t necessary.

    Here are the steps:

    0 – Back up your child theme folder on your hard drive, via FTP.

    1 – Deactivate the child-theme plugin.

    2 – Create a folder called libretto-child and upload it to your /wp-content/themes folder.

    3 – Create a file called functions.php file, add the following code, and upload it in your libretto-child folder:

    <?php
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }

    4 – Upload the style.css file from your backed-up child theme folder into your new libretto-child folder, along with any other files (except functions.php) that you’ve added to it.

    5 – Activate your child theme.

    • This reply was modified 7 years, 2 months ago by Kathryn Presner. Reason: edit for greater clarity
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Child Theme Style.css Not Working’ is closed to new replies.