Sunday 2 April 2017

How to make WordPress Child theme

WordPress Child theme is only Solution for Editing WordPress parent theme. Many bloggers are using Directly Edited Parent themes but it is very difficult to maintain WordPress security updates, For Example you are using a directly customized theme and after update WordPress changes many PHP scripts, Some times updates are partially broken your theme. So always best to make child theme, because child theme is the safest and reliable way.



Child theme is a great functionality of WordPress no doubts. I’m sure you can make awesome templates of WP but you must know about basic Web design languages like CSS and little bit HTML, If Making a Child theme is really easy to you. Two ways we can create a child theme first one is ‘Default Way’ to make a child theme and second one is use a simple way install a ‘child theme configurator plugin’.  So beginners are the best choice to go with WordPress ‘Child theme configurator’ Plugin.

Default Way to Make a Child theme

Go to Host Provider cPanel → File manger →  WP Directory →  wp-content →  themes.
Create a child theme folder in ‘themes’, in my cause I’m using Twenty twelve parent theme and I’m created ‘twentytwelve-child’ folder (Don’t use space between child theme name). Create a CSS stylesheet in the child theme folder Example: twentytwelve-child → style.css
Add Child theme description and Parent theme Path ‘@import url’ (CSS rule)  in ‘style.css’, Otherwise it will not work, Make look like Following Child theme description, Replace theme name and template name with your parent theme name, Example: WordPress Default Twenty Eleven theme users change theme name to ‘Twenty Eleven Child’ and template name is twentyeleven, As ‘@Import url’ CSS rule path is same as below description.
/*
Theme Name: Twenty Twelve Child
Template: twentytwelve

import url-twentytwelve/style.css

4.  Finally Save child theme ‘style.css’ file.

Now Child theme is Added in your WordPress themes, After you can choose the child theme from Appearance → Themes and choose child theme and click to apply.

Above default steps are little hard to beginners, Another Easy way you can build child themes with WP ‘child theme configurator’.

Create a child theme with  ‘Child Theme Configurator’ plugin

It is a simple way to make WordPress Child theme. We have required only ‘Child theme configurator’ plugin and also available many other plugins like ‘One click child theme’ But it have more futures like copy files from parent theme to child theme and available more useful features.

1. Download ‘Child theme configurator’ and activate this plugin, Go to Tools → Child Themes 

2. Select a parent theme and click ‘Create New child theme’, Give a Child theme name and after Click ‘Generate Child Theme Files. You are almost done.

I personally recommend  ‘Child theme configurator’ , because It is free and Easy to use WP Plugin, ‘Child theme configurator’ have more awesome features. Both ways we can make a child theme. You must care about copy whole code from functions.php file because it is broke your theme, So you must make new file like function.php and others files.

No comments:

Post a Comment