How To Create a WordPress Child Theme? WordPress Child Theme Tutorial: How to build a WordPress child theme. We will also learn how to use child themes in WordPress.
To create a WordPress Child Theme, you need to do the following:
1. Creating Your Child Theme’s Folder
2. Creating Your Child Theme’s style.css File
One more thing, you need to activate the newly created WordPress Child Theme.
The first thing you need to do is create a new folder for your child theme. Log in into your WordPress website via your chosen FTP client or CPanel and navigate to “/wp-content/themes/”. Under Themes directory, navigate to the theme installed on your WordPress website.
In the Theme directory (installed), create a new folder. You can name it whatever you like. It is recommended to use a descriptive name such as “New Child Theme.”
Once you have created your folder, you need to add the CSS file (style.css) to create a valid child theme. The child theme’s css.file work as an addendum to the parent theme’s style.css file. Once you have created a new CSS file, open it in a text editor and paste the following into a blank CSS file:
The theme Name, URI, Description and Author descriptions are totally up to you and must be filled in a descriptive manner.
Theme Name: New Child Theme
Theme URI: http://www.WEBSITE.com/FOLDER1/FOLDER2/
Description: Child Theme
Author: AUTHOR NAME
Author URI: http://www.AUTHOR PORTFOLIO.com
Template: TEMPLATE NAME
/* =Theme customization starts here
The code “@import url(“../PARENT-THEME/style.css”);” is used to call the parent theme’s CSS file within your child theme’s style.css file.
You can also modify the theme’s CSS, you can add any changes (code) to the child theme’s CSS file below the @import line. Once you have done it, save your new style.css file to your child theme’s folder.
Now we need to activate the child theme. Login to your WordPress site and go to Appearances > Themes. Find your child theme in the list of available themes and click “Activate”.
Once activated. your child theme should now be the active theme.