What is a Child Theme for WordPress?

Aug 21, 2014 | CSS

You’ve heard of child themes and that you should be using them – but what is a WordPress Child Theme? This tutorial will walk you through a better understanding of what a child theme is and if / why you should be using them.

A child theme (according to WordPress Codex) is:

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.

ummm – an easier way of explaining a child theme would be this:

If you make any modifications or customizations to your WordPress theme, they could all be lost when you click update on your theme. AHH! You don’t want that to happen. This is why you can create another folder inside of FTP and place one file in it to create a “Child Theme.”

This folder and the files inside are what will always override your theme’s default settings – securing your changes!

Did you know that it really only takes 1 file to make a child theme? One css file. This is the file that can have all of your color, font, spacing, styling changes listed in it. It overrides your main (parent) theme’s stylesheet. Well – it can override or accompany it. I explain this more in the video.

Step 1 –
You’ll need access to your hosting cpanel or an access point via FTP.

  • Drill down to this folder wp-content/themes
  • Inside of the themes folder make a new folder called “Child Theme”
  • Click on that folder to go inside of it

Step 2 – Create a new file in that folder and name it style.css

  • Paste the following code into that file
  • Modify the lines of code to better fit your theme. The only required lines are the Theme Name, the Template and the @import line.
  • Watch the video for full detailed instructions
/*
 Theme Name:   Twenty Fourteen Child
 Description:  This is the cool child theme I made from watching WordPress Wednesday 
 Author:       Your Name Here
 Author URI:   http://YourWebsiteHere.com
 Template:     twentyfourteen
*/


@import url("../twentyfourteen/style.css");


/* =Theme customization starts here
-------------------------------------------------------------- */

You’ve just created your first child theme! Now any customization that you’ll do to your theme goes in this file.

Step 3 – Last step – Activate

  • Log in to your site’s dashboard
  • Go to Administration Panels > Appearance > Themes
  • You will see your child theme listed there. Click Activate.