How to Create a Child Theme in WordPress Without the Plugin

Written by: Aleksandr Volodarsky

If you’ve ever created a blog, ecommerce store, or other website in WordPress, then you know that you have a lot of great options to choose from for your WordPress themes. You also know that you have a lot of freedom to customize your themes to make them just right for your website. Unfortunately, if you do this without first creating a child theme, then you won’t be able to keep your modifications when you need to update your page to the next version of the theme in the future.

Because WordPress is always updating its themes to keep them up to date with current online standards and to ensure that they are as functional as possible, you’ll want to have the ability to update your page whenever you need to. Of course, you also don’t want to have to go back and change all of your color settings, as well as any changes you made to titles, links, calls to action, etc.

The simplest way to get around this is to make no changes at all to your themes, but that’s not really an option. In fact, that’s a great way to end up with incredibly bland, formulaic pages that don’t stand out at all (except, perhaps, as being untouched WordPress themes) – so you’re obviously going to need a better solution.

You could, of course, just make a note of all of the changes you made and then go back and do them all over again whenever you update your site, but who wants to waste all that time and energy? Enter the child theme.

What Is a Child Theme?

A child theme isn’t a page themed for children – it’s a separate theme that relies on a parent theme for most of its functions but that has its own functionalities that differ from the parent theme. If you have parent and child themes for your WordPress site, WordPress will first check your child theme for specific functionalities, and if they don’t exist, then it will revert to the parent theme’s functionalities. Thus, you can leave your parent theme unmodified and update it whenever you want. Then the child theme will keep your changes, and they’ll show up in your updated site without any additional work on your part.

WordPress has a one-click plugin that allows you to create child themes, but you actually don’t need this to create them on your own. In fact, creating a child theme is actually fairly simple and doesn’t really require any coding knowledge. You just have to know how to copy and paste.

First you’ll need to create a theme directory in your install of WordPress. Then you’ll go to that directory and create a folder for your theme. Once you’ve done this, open a text editor and create a style sheet titled “style.css”. Copy and paste this code into your style sheet and save it to your theme directory.

/*

Theme Name:   [Your Theme Name] Child

Theme URI:   http: //[your theme’s URL].com/

Description:  Child theme for my site’s 2015 design

Author:     [You]

Author URI:   http: //[your URL].com

Template:    [Your template’s name]

Version:    0.1

*/

You’ll need to change all of the bracketed text to fit your information, but once you’ve done that, WordPress will automatically show your child theme instead of your parent theme. Don’t worry if it doesn’t look different right away. Remember, WordPress will revert to the parent theme whenever the child theme doesn’t have a particular functionality. So you won’t see any changes until you actually update your child theme. Then you’ll be able to do as many updates as you want without losing your modifications to your theme.

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.50 out of 5)
Loading...

Vetted freelance developers ready to start working on your project today.

get a quote in just 15 minutes

You might also like

  • FEBRUARY 17, 2016

    5 Hybrid Mobile App Frameworks You Should Consider

    Written by: Michael Mira

    1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 4.83 out of 5)
    Loading...

    In a previous article, I suggested using HTML5 frameworks for mobile application development. HTML5 has a lot of benefits, such as being less c...

  • FEBRUARY 09, 2016

    The 6 Best Social Media Plugins for WordPress

    Written by: Michael Mira

    1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.60 out of 5)
    Loading...

    Unless you’ve been in hibernation for the past decade, you know that social media practically rules the internet at the moment, and will remain...

  • FEBRUARY 11, 2016

    12 Mac Shortcuts Worth Remembering

    Written by: Michael Mira

    1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 4.80 out of 5)
    Loading...

    If you’re a coding ninja, you know that speed and efficiency are keys to beating a tight deadline. There is a lot of coding to be done, a lot o...

FILL OUT THE FORM
TO GET A QUOTE!
$149monthly plan
The Freelancer
  • 5 developer hours per month
  • Additional development time at $29/hour
  • Unused hours roll over up to three months*
  • Unlimited support 7 days a week
  • Cancel anytime
$495monthly plan
The Professional
  • 20 developer hours per month
  • Additional development time at $25/hour
  • Unused hours roll over up to three months*
  • Unlimited support 7 days a week
  • You can cancel at anytime
$1399monthly plan
The Business
  • 60 developer hours per month
  • Additional development time at $23/hour
  • Unused hours roll over up to three months*
  • Unlimited support 7 days a week
  • You can cancel at anytime

For 90 days from the date of each payment.