Recently, I have come to know about the use of the child theme in WordPress and you will be amazed to know how child theme can be so useful for your website.
"A child theme is a theme that inherits the functionality of another theme, called the parent theme. Child themes allow you to modify, or add to the functionality of that parent theme. A child theme is the best, safest, and easiest way to modify an existing theme, whether you want to make a few tiny changes or extensive changes. Instead of modifying the theme files directly, you can create a child theme and override within" - WordPress Codex.
Creating a Child Theme
Now that you know what a child theme is and when it is used, let’s learn how to create a child theme. To get started with , you need to have some HTML ,CSS skills and PHP basic skills. You also need to have the logins to the theme file from the hosting Cpanel or the FTP. If you have an option to download the theme, you can create a child theme on your localhost.
Activate Child Theme in ModernThemes
1) Go to Appearance => Editor
2) Click on Activate Now
3)Go to Appearance => Themes to check that the child theme is active
4)Go back to Appearance => Editor to make stylesheet changes or add functions
3)Go to Appearance => Themes to check that the child theme is active
4)Go back to Appearance => Editor to make stylesheet changes or add functions
Let's Start
Creating a child theme in the localhost demo site we created in the tutorial - installing WordPress on localhost.
Step 1: Create a Child Theme’s Folder.Creating a child theme’s folder is the first step. Login to your website using your FTP client and go to “wp-content/themes/”. Inside the theme folder, you will see folders with the themes installed in your website. Create a folder and give it your preferred name. It is important to give the folder a descriptive name that will help you know that it is the folder for the child theme.
Step 1: Create a Child Theme’s Folder.Creating a child theme’s folder is the first step. Login to your website using your FTP client and go to “wp-content/themes/”. Inside the theme folder, you will see folders with the themes installed in your website. Create a folder and give it your preferred name. It is important to give the folder a descriptive name that will help you know that it is the folder for the child theme.
Step 2: Create Child Theme’s style.css File
The style.css file is important since it work sas a supplement of a kind to your parent theme’s style.css file. To create the style.css file, open a text editor and type or paste the following:
/*
Theme Name: Evolve Child Theme
Theme URI: http://www.theme4press.com/themes/evolve
Description: Evolve Child Theme
Author: Theme4Press Themes
Author URI: http://www.njengah.com
Template: Evolve
Version: 1.0.0
*/
The style.css file is important since it work sas a supplement of a kind to your parent theme’s style.css file. To create the style.css file, open a text editor and type or paste the following:
/*
Theme Name: Evolve Child Theme
Theme URI: http://www.theme4press.com/themes/evolve
Description: Evolve Child Theme
Author: Theme4Press Themes
Author URI: http://www.njengah.com
Template: Evolve
Version: 1.0.0
*/
Step 3: Call the parent theme’s CSS file
It is important for you to call the parent theme’s CSS file without the child theme’s style.css file to prevent WordPress making your child theme’s style.css file the default style file. In the event that WordPress makes your child theme’s style.css file the default style file, the theme would not have any CSS styling. To prevent this from happening; you need to add the following line of code to your child theme style.css file.
@import url("../parenttheme/style.css");
After adding the above line of code, save your style.css file to your child theme’s folder.
Step 4: Activate your Child Theme
The fourth step is to activate the child theme. To activate the child theme; go to “Appearance > Themes” in your WordPress admin area and you will see all the themes in the website. You will note that the parent theme is activated.
Step 5: Using the Child Theme
Now that you have created your child, it is time to make use of your child theme by adding customization on your child theme.Before we can add any customization Evolve child theme is working well.
Step 6: Customizing Child Theme.
You can create a child theme of any parent theme by modifying the above codes. If you want to have a try to Colorway theme, feel free and buy it from the InkThemes market with a decent price.

No comments:
Post a Comment