Ever make a change to your theme, and after you update the theme to a new version, your change is gone?
Or maybe you are lucky and haven’t had this happen. But this could happen. Many inexperienced developers will make changes to your theme without making a child theme.
At WP Radius, whenever a client requests a change to their theme, we always recommend a child theme. And will create one for them.
So we are all for Child Themes and wanted to share a bit about them with you.
One of the best resources is Nick Schäferhoff’s article at Smashing Magazine: How To Create And Customize A WordPress Child Theme.
Here are a few of the main points from the article you should know.
Why Modifying A Theme Without A Child Theme Is Bad
Sometimes you or someone you hire will have to make changes to a theme’s code. Maybe you change link and text colors, or change backgrounds, or change the layout of elements.
If you make these changes to the theme files, when the theme developer releases an update, all of your changes will disappear.
That’s not great, especially considering you spent a lot of time and/or money on the changes.
You might ask, “What if I don’t update my theme?”
You can go this route. But we recommend against this. Doing so can leave you vulnerable to security issues that many theme updates patch.
So, as you can guess now, we recommend making a child theme where you can make all changes.
But what is a child theme?
What Is A Child Theme
To understand a child theme, you need to understand parent themes.
In essence, any theme can become a parent theme.
When you create a child theme, it becomes dependent on the parent theme. The child theme borrows files, styling, functionality, and more from the parent theme.
As Nick says in his article, “The big difference is that a child theme depends completely on its parent in order to work. Without its parent theme present, it will not do a thing and cannot even be activated.”
With that child theme, you can then add code to your child theme that makes edits and changes to the parent theme.
However, when you go to update the parent theme, all changes that were made to the child theme remain untouched.
How To Set Up A Child Theme
Setting up a child theme may seem complex, but by following great instructions, it can is rather easy.
If you are interested in setting up a child theme, we recommend checking out Nick’s step by step instructions on how to set up a child theme.
Child themes are great. As mentioned, we use them quite a bit and have helped many clients set up child themes.