Please, please, please use child themes, or, why you should always use a child theme

I know this has been said many times before but after last week’s Grisaille update, sadly, I’m still getting emails like this:

Hi there,

I just wanted to let you know that your latest theme update will take me HOURS to fix!

As we say here in Quebec, pas l’fun.

So for those of you who aren’t aware, always use a child theme when doing any kind of style modification to your themes. It will avoid everyone having to deal with this unpleasant and frustrating situation.

What’s a child theme?

From the Codex: “A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.

In other words, go crazy modifying your theme but do it in a child theme since none of it can get overridden when you update the parent theme.

How does one create a child theme?

I’m glad you asked. The codex has instructions on exactly how to get one set up. If that doesn’t makes sense to you, I’ve made a blank child theme for you, specifically for Grisaille, which you can download further down (the big orange button). I’ve started you off with just the stylesheet, but that’s all most of you will need.

Blank Grisaille Child theme

If you want to use it for any other theme, feel free to do so. You’ll need to change two things in the [highlight]style.css[/highlight] file to get it working:

  1. on line 6: change the Template name, which is the folder name of the parent theme you are using–careful, it’s case sensitive.
  2. on line 10: change the path to the style.css in your parent theme in the @import rule. This will be the same folder name as the Template name from line 6.

I hope some of you will find this useful and hopefully avoid the same fate as some of the people who emailed me about this.

2 thoughts on “Please, please, please use child themes, or, why you should always use a child theme

  1. When I started I had never worked with WordPress before. That being said, I tried setting up a child theme.. well after I had adjusted the parent Grisaille theme and so I don’t know where certain changes were made for certain things I adjusted. When I try to use the child theme, the Facebook icon doesn’t appear at the top and the nav bar font changes as well as bad behavior’s comment line appears at the bottom. What are your thoughts and what info do you need to be able to give advice?
    Thanks in advance,

    1. Hi Chase,

      I’d recommend using a diff tool of some sort to compare your current version of the theme to the original one. Be sure you keep a copy of your modified theme in case something goes wrong.

      As for why the styling suddenly changed (facebook icon + bad behavior), I’d need to see the code to help but it’s most likely a css conflict.

      Hope that helps.

Leave a Reply

Your email address will not be published. Required fields are marked *