Always create a child theme. I write it in every blog post and for good reason.
- Child themes prevent your updates from being overwritten when the theme updates. It will save you that feeling of white hot terror when you find all your updates have been removed.
- Version control is much easier with a child theme.
- Because most of the site customizations are in one place, it makes it easier for developers to help when you need it.
Template over rides and custom code should all be saved into a child theme. WordPress cannot copy over a child theme. Child themes are a convenient way of collating and keeping all customizations together and they make version control much easier too.
The first thing I do when I make a new site is the install my favourite theme. I choose to use Divi from Elegant themes.
The second thing I do is install Child Theme Creator and make a Divi child theme. This one is free and the author has been around the wordpress community for a long time chiming in with a ton of valuable wordpress related contributions. I like to pay it forward… that’s why I continue to use it.
It doesn’t matter which theme you use, Child Theme Creator works with all of them.
There are probably a few other child theme plugins around… but I have been using this one for a very long time and its never failed me.
If you choose to use another plugin, the concept will be the same.
Child Theme Creator by Orbisius
Once installed, setup is just a few clicks.
A new theme folder will be created on your server where you can save any custom files.
When you SFTP into your server you will see where the folder has been created in your themes folder /wp-content/themes/
Opening my child theme folder you will notice I have added some custom files that I use across the site.
Upload your custom files to your child theme to keep them safe from wordpress updates.
Any custom function that you create should ALWAYS be saved to functions.php of your CHILD THEME. DO NOT save it to the parent theme functions.php because you will eventually lose it.
Any CSS that you add is ALWAYS saved to style.css in your CHILD THEME. Often your theme customizer will provide a space to add CSS which it saved to the database. This is OK but I prefer to add the CSS to a style sheet and upload it because its one less thing the database has to do which makes the site slightly faster. It makes version control must easier too because everything is in one place.
In the end it doesn’t really matter if you setup a child theme using a plugin or you do it manually… ALWAYS create a child theme.
0 Comments