This article was last updated on the December 9, 2016.
Setup a child theme
Child Themes: Your New Best Friend
A child theme is a theme that inherits the functionality of another theme, called the parent theme. Child themes allows you to modify, or add to the functionality of that parent theme instead of modifying the core theme files directly. The problem with modifying core theme files is that your changes are in danger of being overwritten if and when you update the theme to the latest version down the road. This is obviously an undesirable outcome, especially if you’ve made dozens of adjustments throughout the theme. Ultimately, child themes are great for a few different reasons:
- If you modify an existing theme and it is updated, your changes will be lost. With a child theme, you can update the parent theme (which might be important for security or functionality) and still keep your changes.
- It can speed up development time.
- It’s a great way to get started if you are just learning WordPress theme development.
Setting up a child theme actually takes a little bit of work as you need to create a new directory for the child theme, specify the parent theme so WordPress knows where to apply the new changes, enqueue the parent theme’s main CSS file, et cetera. You might also want to setup a functions.php file for various pieces of functionality that you want to add or modify. Fortunately, we’ve done all the heavy lifting for you in this area and all you need to do is use our provided child theme, which requires none of the setup listed above.
Provided Child Theme
We provide a ready made child theme for you to use in the Members Area
Let’s get started on installing our child theme, head to the members area as mentioned above, scroll down and you should see the child theme option like this:
Go ahead and click on that, which should present you with a screen like this:
Now it’s important to note the message at the bottom of the screen which reads:
If your version of X is v3.2.1 or older, you will need to update to utilize this new child theme structure. If you are still using an older version of X and are looking for our legacy child themes, you can find them here
So if you are using a X version of 3.2.2 or above, you can go ahead and just download the theme, by clicking on “Download Child Theme” button. If you don’t, you’ll need to visit the provided link to the legacy child themes. For the purpose of this article, we’ll be covering installing the current/latest version of the child theme.
Once you’ve clicked on “Download Child Theme”, you should have a prompt to either open or save the file like this:
We want to save it, so we can upload the compressed zip later to our WordPress site, so go ahead and check saved and then click “ok”
Note: Exactly how the prompt shows will depend on your computers operating system, but it should be self explanatory.
Installing The Child Theme
Now you have the child theme downloaded it’s time to install it, go ahead and open up your WordPress dashboard/admin, i.e (yourdomain.com/wp-admin) and login. On the right hand side click on “Appearance”, you should now have a screen like this:
As you can see in the screenshot above, there’s a couple of “Add new theme” buttons, click either one. 🙂 You should have a screen like this now:
Click on “Upload theme”, then click on “browse”:
Find the child theme you downloaded in the earlier steps and select that to upload, then go ahead and click on “Install Now”:
The theme will now install, once it’s installed, go ahead and click on “activate”:
Congrats! You’ve now successfully downloaded, installed and activated your child theme, you can now safely make edits without fear of losing your modifications on a parent theme update.