If you are customizing your WordPress theme, then you should be using a WordPress child themes, for the reasons i will discuss later in this article. However, generally more than 60 percent WordPress users do not create WordPress child theme while doing customization to their WordPress themes, apparently because they think that it is quite a difficult process. On the contrary it is quite simple one.
What is a WordPress Child Theme
A WordPress child theme is a theme that inherits the functions, features, code and layout from the parent theme without making changes to the parent theme itself but you can modify it without affecting that future WordPress parent theme updates will reverse the changes.
If you have a WordPress child theme and have made customization using the child theme, then you can confidently update the parent theme and all your customization will remain intact even after update of the original theme, because during updates all parent themes files are overwritten by newer files.
Though you can exercise the option to not upgrade your parent theme but sometimes there are security related updates which you have to make to keep your WordPress site secure. Theoretically speaking all WordPress themes can have child themes.
Why to Use Child Themes
Before creating WordPress child theme, you also need to understand the reasons that why you should be using one. First of all, as already explained above, you can safely update your parent theme without worrying about losing the changes you have made to your site using child theme.
Secondly, you can extend and customize the child theme to your liking using hooks and functions inherited from the parent theme and also writing your own new custom CSS and functions code without worrying about losing your work on theme updates. Thirdly, you can easily tweak the changes to child theme?knowing that if something goes wrong you can always fall back on the parent theme to keep your site up and running.
Disadvantages of Child Theme
With the above advantages, there are some perceived disadvantages too that are associated with the WordPress child themes. One big disadvantage is that in order to meaningfully create functional child themes, you need to learn about the parent theme or framework. However, this might be a difficult thing for first theme, but over a period of time, you can significantly reduce the time you will need in creating child themes based on the parent theme or framework.
Another disadvantage is that the developers of the parent theme might loose interest in pushing out updates to the parent theme. However, most WordPress themes are open source, and some other people take over from where the original developers leave. And in case of commercial paid WordPress themes and frameworks like Genesis and MyThemeShop, you get regular updates and support.
How to Create a WordPress Child Theme
There are two ways to create a WordPress child theme. One is without plugin and the other is with a WordPress plugin.
/* Theme Name: Schema Child Theme URI: http://fastwplearning.com/themes/Schema-child/ Description: My first child theme, based on Schema Author: Usman Author URI: http://fastwplearning.com Template: Schema Version: 1.0.0 */
);/* =Theme customization starts here */
There are two important lines in this code. One is Template and the other is @import. In both the cases, you should write the name of the theme exactly like it is named originally (it is case sensitive).
What @import line does is that it inherits the CSS?file from the parent theme. And after this line you can start customization. In order to change functions or write new functions, you can create a functions.php file inside your child theme folder. The next step is to go to the?Appearances > Themes page on your WordPress dashboard and activate your child theme.
An easier way of creating a WordPress child theme is One Click Child Theme plugin which can create child themes without you needing to write or edit any code. However, for making customizations, you will need to write CSS or PHP code.
One piece of advice for those using premium themes like from MyThemeShop or theme frameworks like Genesis is that you for simpler CSS changes you can use the Custom CSS filed provided in the theme options. The changes you will make to Custom CSS will survive any theme updates. However, any changes you will make to PHP files will be erased on a theme update.
In short if you are doing extensive cutomizations, you need to create a WordPress child theme. Otherwise, Custom CSS should be your choice.