How to install and create a child WordPress theme?

create child WordPress theme

If we try to understand the basic concept of child WordPress theme, it will not be too intricate. As it can be fairly judged by the name, a child theme is the one that relies on a parent theme. Conceptually, the child theme borrows all the necessary things from the parent unless the child one comprises everything it needs to function.

While using the parent’s functionality, coding and controls, the child WP theme is available for you for more changes in appearance and styling, feature modification and customization without affecting the parent theme itself.

While choosing a child WordPress theme instead of creating a completely new one from scratch comes logical and reasonable for a number of evidences. First of all, if you install and create a child WordPress theme, you are lucky enough to enjoy WordPress or parent theme updates without influencing your child theme or its changes. It means that your work will not be overwritten by any further update.

Apart from being secure and providing you with a standalone database in which you can copy the files of your theme, a child theme also comes with extensible functionality controls. You will be able to easily extend the child theme’s functional capacity without tweaking into coding.
Well, the good news is that you can install and create a child WordPress theme of any parent template as effectively and quickly as you can never imagine.

Creating and getting started with your own child template will be as easy as a pie and will not cause the necessity of turning to the professional’s assistance and intervention. However, a basic understanding of CSS/HTML, as well as of PHP will drastically speed up your workflow.
On the one hand, you have a favorite parent WP template and want the respective child theme to inherit its look and feel, as well as clear and durable coding.

On the other hand, you have certain touches and amendments to be added to the child theme, but want to make sure that you will not affect the parent theme and will be able to keep your modifications separate from it. In this situation, the best way is to install and create your own child WordPress theme and manage it the way you want.

All in all, if you want to play with little things, change this or that font, style, etc and be sure that you won’t lose anything in the future, we offer you to get started with the selection of the parent theme as the starting point. However, while giving your preference to this or that template, take into consideration its capacities and functionality options to be near the one you want to have in your child theme.

As soon as you are done with the selection of the parent WP theme, we can pass on to the processes of installing and creating a child WordPress theme.

1. Creation of a child WordPress theme folder in directory.

The first thing you are supposed to do is to create a child theme folder in the themes directory. For doing this you need to use your FTP or hosting provider’s file manager application. Then pass on to “/wp-content/themes/” where you can find one or several folders each for a theme installed on your website. Create a new folder and name it whatever you want. However, it will be better to use any logical or descriptive name –child in the end or something like that.

2. Creation of a style sheet to style your theme.

The next step for you to follow is the creation of a style sheet file known as style.css. It’s the file you need to control the appearance of your child WordPress theme.
Open any text editor program and create a sheet containing the below mentioned code:
/*
Theme Name:   SKT Perfect Child Theme

Theme URI:    http://www.sktthemes.net

Description:  SKT Perfect child theme

Author:       SKT Themes

Author URI:   http://www.sktthemes.net

Template:     SKT Perfect

Version:      1.0.0

*/

At this stage, we would like to draw your attention on two important points. The first one is the Template. It should be the name of the parent theme. The second one refers to the importance of integrating the parent’s theme CSS file within the child theme’s style.css file with @import url(“../parenttheme/style.css”) code. Another more practical way is through enqueueing the style sheets of parent and child themes by adding a wp_enqueue_scripts action and using wp_enqueue_style() in functions.php.

These are the basic requirements to proceed with the activation of your child theme.

3. Activation of a child theme.

Now you can navigate to Appearance, Themes in your WP Admin dashboard and find the relevant theme here listed below. Just click on the Activate button and your child theme will be listed among the active themes. Since you have not managed to make modifications to this template, it will appear just as the parent theme with the same look and feel.

4. Customization of a child theme.

Now, what is left to you is to manage the given child theme the way you prefer. Here is when you will enjoy your basic understanding in CSS. Chrome and Firefox will help you in inspecting HTML and CSS of any web element. Use Ctrl+Shift+I combination to inspect elements and try to edit CSS there to see how it works. For example, if you make any color change and it appears fine, you can copy and paste that CSS rule in your theme’s style.css file. Save those changes and preview your site.

Apart from CSS controls, you may want to edit the child WordPress theme’s template files. In this case, you have to do with PHP codes. For example, if you want to remove some link from the header area and add your own one, you need to copy header.php file in your theme, open it in a text editor, find the line you want to replace by yours and do it.

Related Videos

Thank you for visiting SKT Themes a place for selecting top WordPress Themes from a list of several hundred templates. Happy Reading and Shopping.

One thought on “How to install and create a child WordPress theme?

  1. Tammy Ane

    I think there are many other people who are enthusiastic about them just like me! How much time does indeed it take to complete this awesome article? I have read through other sites, nonetheless they are difficult and confusing. I actually hope still have such quality articles to discuss with everyone!

Comments are closed.