Hello Friends, Today i am going to teach you how to Create WordPress Child Theme. As you know that there are several WordPress themes available for free, but sometimes we cannot find the theme as our requirement, for that we can create a child theme by using simple steps for your website.
How A Child Theme Works And Why To Use It
Child themes are separate from parent theme but it depends on the parent theme for their functionality. Child themes are mainly created for the purpose of saving the customization made by user. In other words, we can say that if we want to use any WordPress theme and want to do some customization in that theme, then we should create a child theme of that WordPress theme so that in future if there is any updation in parent theme even then our customization doesn’t get lost.
SO lets start creating your first WordPress Child Theme
Go to your theme directory i.e. C:\xampp\htdocs\wlp\wp-content\themes and create a folder of your child theme and name it twentyfourteen-child.
Now inside child theme directory create a style.css stylesheet and copy, and paste the following code in the file you have just created.
/* Theme Name: Twenty Fourteen Child Theme URI: http://weblpoint.com/twentyfourteen-child/ Description: My first child theme, based on Twenty Fourteen Author: Raj Techie Author URI: http://weblpoint.com Template: twentyfourteen Version: 1.0.0 */ @import url("../twentyfourteen/style.css"); /* =Theme customization starts here ------------------------------------------------------- */
The important items in above code are lines starting from Theme Name, Template and @import. Theme name tells the name of your child theme, The template tells WordPress which theme it should consider as the parent theme and @import tag imports the CSS from the original. The other details are not mendatory but only to display other details like Description of the theme, Theme URI: from where the theme should be downloaded, Author: name of the author of theme,Author URI: display about the author of the theme and Version: version of the theme.
Now activate your child theme by visiting Appearances > Themes. Your theme is active and now you are ready to customize your child theme according to your need.