WordPress CMS is a powerful tool for developing websites. Person with development or non development background can easily develop site with this open source CMS. WordPress works on a potential tool named Themes. WordPress Theme is the prime factor responsible for the appearance and functionality of a WordPress website. Basically there are two types of Themes in WordPress- Parent Theme and its Child Theme. So why there are two types of themes in WordPress?
What is the significance of WordPress Child Theme and How it benefits over Parent Theme?
A parent theme is a stand alone theme which works independently in WordPress. A parent theme is fully functional and doesn’t need any other features from other themes.
A child theme cannot function on its own without its parent theme. The child theme inherits functionalities of the parent theme. Even though a Child Theme is dependent on its Parent Theme to function, still it is recommended to use it as a prime theme. This is because the child theme is responsible for changing or adding extra functionality or styling to the parent theme without touching the actual parent theme files.
Why to use a Child Theme?
If you modify a theme with new functionalities and styling directly and suppose it gets updated automatically, then your modifications may be lost. By using a child theme as a prime theme you will ensure that your modifications are still preserved as a Child Theme never gets updated automatically by WordPress.
So it is recommended that always use a Child Theme of whichever theme you buy or download and modify only child theme with your new ideas, styles and functionalities to reflect them on front end.
At PurposeThemes, recently we released a Child Theme for Twenty Sixteen named Brownie with more features and customization. We have also indexed some of the best premium Child Themes built with Genesis Framework from StudioPress. Some of these are:
- Author Pro – A WordPress theme for Authors and Writers
- Altitude Pro – Parallax theme for Corporate Websites
- Modern Studio Pro – Blogging and Magazine WordPress Theme
- Magazine Pro – A Magazine styled WordPress theme
- Foodie Pro – A WordPress Theme for bloggers who love to write on food.
When to look for normal or Parent theme and when to use Child theme?
- It will preserve your modifications.
- You are aware of what and where changes are made in child theme because of less number of files as compared to parent theme.
- Easy to restore.
Basic file structure required for every WordPress Child Theme:
A child theme consists of at least one directory (the child theme directory) and two files (style.css and functions.php), which you will need to create:
- The child theme directory
It is necessary to check this file structure while choosing or coding a Child Theme. The first step in creating a child theme is to create the child theme directory, which will be placed in wp-content/themes folder. It is recommended that the name of your child theme directory is appended with ‘-child’. The next step is to create your child theme’s stylesheet (style.css). The final step is to enqueue the parent and child theme stylesheets with wp_enqueue_scripts action and use wp_enqueue_style() in your child theme’s functions.php file.
Benefits of using Child Themes as prime theme for your website are as follows:
- Using a child theme can speed up your development time.
- As child themes do not get updated automatically, your modifications are preserved.
- Using a child theme is a great way to learn about WordPress theme development.
- A child theme can inherit the functionality, features, and behavior of its parent theme, and even extend them by means of customization.
There are no specific disadvantages of using a child theme but if you are satisfied with the functionalities and looks of original theme then why go for a Child Theme? Parent theme is best at its place as well.
There are few Plugins to help you create Child Themes easily:
1. Child Theme Configurator: Creating child themes and customizing stylesheet, templates and functions is easy with this plugin. It easily enqueues Parent and Child theme Stylesheet.
2. Child Theme Creator by Orbisius: Building Child Themes is quick and easy from any theme that you have currently installed on your site/blog with this plugin.
3. One-Click Child Theme: Adds a Theme option to any active theme allowing you to make a child theme.
4. Child Theme Wizard: Creates a child theme with one click and lets you customize its options.
If you don’t want to use the theme as it is and like to modify few CSS and even layout, it is recommended to create a Child theme. This way you will not lose any customization even after updating the parent theme to its latest version. As making changes in the core theme files will make it difficult to update the theme in future.
Let us know your thoughts about Child Theme and Parent Theme. If you have developed any Child theme, share the challenges that you faced.