How to Create a Child Theme in WordPress

wordpress-child-theme-unity-blogger
 |  |  |  | 2 Comments

Many WordPress developers are using WordPress Child Theme. The main purpose of a child theme is to extend the design and development and save the customization even parent themes are updated. As per the Client requirement or the website requirement, we need to do few customizations in the theme. It may be the pages modifications or CSS changes.

If you made the changes in the parent theme and after sometime updated are available for the customized theme. If someone has an update it then your all the changes will be gone. So to avoid this situation, you need to create a WordPress Child Theme.

A child theme required Parent theme and at least two files i.e function.php and style.css

  • Copy the parent theme’s folder and paste in the new folder anywhere or just copy paste in the same directory.
  • Now, you need to give Good Name to your Child theme. Rename it and add  “-child” word. If e.g parent theme is unityblogger then the child theme will be unityblogger-child.
  • If you want to use any other name then you can use.
  • Create a new function.php file and add below code.

  • This code is used to initialize the Js and CSS in  WordPress using Hooks.
  • Above code will initialize the style CSS.
  • Create a new style.css file. In the style.css file, you need to add Theme Name and Parent theme’s name with Template. Copy below code and paste in the style.css file. Replace the content as per your requirement.
  • Suppose you want to create a child theme from twentysixteen theme then add below code in the style.css.

  • Save all the files.
  • Go to wp-admin and then theme section. You will see  “twentysixteen child” theme in the theme listing.
  • Please activate it and enjoy the WordPress Child Theme Customization.

Author:

Hello friends, I have created unityblogger.com for the unique bloggers and readers. We’re accepting unique guest posts from real authors. If any blogger or author interested to post a blog on unityblogger.com then they are always welcome.

2 thoughts on “How to Create a Child Theme in WordPress”

Leave a Reply

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

4 × 3 =