Other Computing

How to create a WordPress child theme for beginners

A WordPress child theme allows you customize and edit your WordPress theme without risking doing irreparable damage or losing all changes you have made after updating the theme.

A WordPress child theme inherits the parent theme functionality,the Cascading Style Sheet is imported from the original theme and all modifications you make to it are stored in the child theme instead of the parent so that they can not be overwritten.

Beginners can create a child theme using one of the following plugins:

One Click Child Theme: It can be used in shared hosts to create a WordPress child theme with a single click. It doesn’t require you to learn how SFTP works.

Child Themify: Compatible with multiple sites, a WordPress special edition called MU (Multisite) able to administrate more than one wordpress installation with a single interface.

Wordpress child theme diagram
WordPress child theme diagram

Orbisius Child Theme Creator: It can create unlimited child themes from a single parent theme. This plugin includes a child theme editor to compare side by side the original parent theme file with the modified one.

Creating a child theme manually

Advanced users can create a child theme if they know how to SFTP to a server and edit Cascating Style Sheets.

To have a WordPress child theme you first have to create a child theme folder inside wp-content/themes you can name that folder anything you like, normally, if it was based on the twentyfour theme it would be called twentyfour-childtheme

Then you code an empty style.css file as written below, just replace where it says twentyfour with the name of your original theme:

Theme Name: Awesome Twenty Fourteen
Template: twentyfourteen
@import url(“../twentyfourteen/style.css”);
/* Theme customization starts here */

Save the style.css file and upload it to the twentyfour-childtheme folder you have previously created.

Now you will see the new twentyfour-childtheme inside the Worpress administration panel going to Appearance>Themes  activate it and you ready to customize the new layout without fear of breaking anything. Reverting changes will be as easy as activating the original theme.

Just a warning, I have found it difficult to add analytics to a child theme because I am not well versed in web design. I got around it by downloading the StatCounter plugin for WordPress so that I don’t have to edit my theme to add any analytics code and the code will always be there after a theme update or change.

To save you time, I am making my child theme CSS file described above available for download in this post. You will also find an empty functions.php file and an empty images folder, those are used to augment the level of child theme customization, like creating a widget, you don’t have to necessarily use everything, uploading all files will not tear apart your layout.

Download twentyfourteen child theme files

Leave a Reply

Your email address will not be published. Required fields are marked *