As you delve a little deeper into WordPress it is inevitable that you will read about parent & a child theme. Whats it all about though?
This is basically any theme you want to work with. It is the theme that has all the functionality that’s used to build a website.
A lot of the features of the website is managed by this theme, from theme options to base styles. This theme can stand alone, it’s not obligatory to have a child theme.
This theme is created from the parent theme. In our case, the current theme we use is a child theme based on the Genesis framework
A child theme inherits all the functionality and styling of the parent theme.
It begins as an empty theme with only a style.css file with a special CSS comment stating what theme you want to create a child theme for [that’s the parent theme]. A theme developer only includes the files they want to override (that is, new header.php, new functions.php). Child themes are basically the prescribed way of modifying an existing theme and tweaking code without it being overridden when the developer pushes out an update to the parent theme.
Why should you use a Child Theme?
WordPress offers a whole lot of flexibility when it comes to designing your own website or store. You could virtually create a unique look and experience making use of a theme and extensions. However unless you find a theme that perfectly matches your needs, you won’t be able to modify it to suit the tiny details you may require.
That’s where child themes come in. A child theme is used to add extra styles, features or functions without modifying the parent theme.
In case you are going to heavily modify a theme by including tweaks, changing the code and so forth, you only want to modify your child theme. If you alter your parent theme and later, an advanced version of the theme is created with different code, all your modifications to the previous code would be lost. Basically, the new code from the updated version will overwrite your old code and you’ll lose everything, so it’s just best to create a child theme and do all modifications to the child folder.
Additionally, the child theme could be used as a new format or design of the website, which might not be available or come with the parent theme.
Child themes additionally allow users to customise their website themselves without touching any core files, thus offering newbies an opportunity to work with WordPress.
*Note: Child theme requires a parent theme to work.
The minor disadvantage of a child theme is that you have to buy & install framework and child theme. Nonetheless, it does not cost much these days.
Choosing a good parent theme
This part is important, all frameworks are parent themes, but not all parent themes are frameworks. By this I mean that not all themes are designed to have a child theme created from them. A common mistake is when a user creates a child theme from a parent theme that has little creativity. In this case, it wouldn’t be worth the effort to create a custom child theme. If you do decide to go with a child theme, pick a parent theme that has good styling options. This way you can tweak if necessary without creating a total overhaul.
In simple terms what is the advantage of choosing a child theme?
- Easy to edit – great flexibility to simply add code to a child theme without modifying files. You don’t really want to be messing around too much with this if you are not experienced.
- Updates – A child theme inherits the parent themes features and styling. If a theme developer pushes out a theme update such as a bug fix etc, you are safe to update knowing that your changes are saved in the child theme.
- Safety Net – Creating a Parent theme is hard work, there are so many things in the WordPress world that need to be made compatible. Using a child theme of a reputable parent theme overrides this as you can edit the child theme knowing that the parent theme’s (hopefully well coded) functionality is available as a backup option
The only real disadvantage to using a child theme is if you happen to choose a poor parent theme. In the unlikely scenario that the person that developed your theme has lost interest and failed to keep the parent theme updated, then you could be in trouble. That is why I highly recommend using a solid theme developer like GeneratePress or the Genesis framework. This isn’t intended as scaremongering but something to be aware of! For the most part, the majority of reputable sites like Envato market and Templatemonster only work with dedicated developers.
This website is built on a child theme of the Genesis Framework. We have the option to change CSS and PHP code if we wish. Whenever Genesis developers push out an update to the Genesis framework, we simply update and our child theme remains unchanged
Leave a Reply