What is a child theme?

As mentioned on the codex , a child theme is a theme that inherits the functionality and styling of another theme, called the parent theme. So basically child themes are separate themes that rely on a parent theme for most of their functionality.

Why child theme?

The main reason of using a child theme is to extend the functionality of its parent theme. Suppose you bought a theme that you like but are unhappy with some of the theme features or would like to add some of the features that you want on the theme, or would like to remove some of the features of the theme, this is when the child theme is required.

Child themes are considered the best way to customize the WordPress themes. The reason why we need to create the child theme instead of directly writing the functionality on the parent theme is that modifying a theme will prevent you from updating it to a newer version in the future. Yes there will be an update option unless you modify the theme version or the theme name itself but as soon as you update the theme, all of the functionality or let’s say codes that you have added on the theme files will be gone.

So if you want to add some codes/functionality to an existing theme but also wish that the changes you make will always be available after the theme is updated then you must always use child theme.

Leave a Reply

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