WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Creating Child Themes (12 posts)

  1. Claudia
    Member
    Posted 1 year ago #

    So I was able to create a child theme, and so far I just want to make changes to the CSS file.

    The thing is that somehow on the way, though the child theme is chosen and I've added a few lines of custom CSS to the style.css, the website goes to the main CSS file of the parent theme.

    What should I do to make the website catch the changes on the Child Theme CSS file?

    Thank you!

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Have you reviewed child themes?

  3. Andrew
    Forum Moderator
    Posted 1 year ago #

    Could you link to the website that has the issue?
    This way we can see whether your Child Theme is loading and narrow-down whether it's just a CSS Specificity issue.

  4. Claudia
    Member
    Posted 1 year ago #

    Yes sure:

    http://www.creativetwiggs.com/

    Thank you!

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

    Not-to-worry, your Child Theme is loading, as with its stylesheet.
    I tested this by adding a 10 pixel red border to one of your styles in your Child Theme stylesheet [screenshot].

  6. Claudia
    Member
    Posted 1 year ago #

    Sorry, really... but I don't see that.

    I was actually doing some changes to the name of the child-theme while you were doing that and I had to activate the child theme again. However on the Development Tools, I see the path for the parent theme and I get access to the parent theme stylesheet which has actually a different name (base.css).

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    There are two stylesheets being loaded here [screenshot], your style.css file and base.css file.

    Is there any way you could get style.css loaded after base.css?

  8. Claudia
    Member
    Posted 1 year ago #

    Well, you tell me... how can I do that? I just learned today how to create a Child Theme, so I'm all ears! :)

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    Grab the header.php file from your actual theme, then copy & paste it into your Child Theme. So, you'll end up with a header.php file in your Child Theme folder.

    You can then modify header.php in your Child Theme folder without worrying about messing up the actual theme.

    Can you copy all of the code from header.php and paste it in PasteBin.com? Then post here a link to that PasteBin'd page for us to take a look at?

  10. Claudia
    Member
    Posted 1 year ago #

  11. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you then replace your Child Theme's header.php code with this code from PasteBin http://pastebin.com/WU0H3c4Z ?

  12. Claudia
    Member
    Posted 1 year ago #

    Done and it's working now! Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Topic