• Categories
    • Tutorials
    • Beginners Guide
    • WordPress News
    • WordPress Security
    • Best WordPress Plugins
    • WordPress Themes
    • Product Reviews
    • WP Tips & Tricks
  • Guides
    • Start a Blog
    • Make a Website
    • WordPress Hosting
  • WordPress Hosting
    • A2 Hosting
    • HostGator
    • Bluehost
    • Cloudways
  • Managed Hosting
    • WPEngine
    • Rocket.net
    • WPX
    • Kinsta
  • Coupons
    • WPEngine
    • Flywheel
    • Cloudways
    • A2 Hosting
    • WPX Hosting
WordPress Themes

Everything You Need to Know About WordPress Child Themes

Last Updated on: January 10, 2016 Rachel Adnyana 12 Comments

Everything You Need to Know About WordPress Child Themes

A child theme is a set of styling rules and/or functions that are used to add functionality or change the look of an existing WordPress theme. Child themes can be modified without altering the original code of your theme, allowing you to make changes as small as changing a couple of colors, or as extensive as completely changing the look and feel of your theme.

Many WordPress framework themes, like Genesis, work by using the child theme feature in WordPress. The basic functionality of the theme is contained within the parent theme and child themes can then be used as a way of applying different “skins” to the theme.

Why are Child Themes so Essential?

While many users choose to use their WordPress themes straight out of the box, it’s also very common to customize themes by editing the style sheets or by adding new functions to the functions.php file.

There are two main problems with editing your WordPress themes directly like this:

  1. If you make a coding error, it can break your website.
  2. When you update to a new version of your theme, all your previous changes will be lost.

Of course it’s possible to overcome these problems by backing up files and keeping copies of changes you make, but this can quickly become tedious, especially if you’re using a theme that is updated frequently.

The best way to make changes to the look of your theme or add to its functionality is by using a child theme. As the files of a child theme are separate to that of the parent theme, they won’t be affected by any updates and if you make a mistake, it’s easy to deactivate the child theme and go back to the original while you sort it out.

Child themes can also be very useful for people who are new to WordPress development. Rather than starting to code a new theme from scratch, it’s much easier to start with a basic theme and then create a child theme to edit the structure into looking the way you want.

How to Create a Child Theme

child-theme-folder
To get started with creating a new child theme, you first need to create a new folder for it. Use an ftp client to connect to your website and navigate to your WordPress themes directory (/wp-content/themes). It’s conventional to name your child theme folder the same as the parent theme, with “-child” appended to it. So for example, if you are creating a child theme for the Twenty Thirteen theme, you should name your folder “twentythirteen-child”.

All of your child theme’s files will reside in this folder, but not every child theme consists of a lot of files. In fact, the minimum you need to create a child theme is a style.css file.

There is a basic template you should follow for creating the style sheet for your child theme, so go ahead and copy the code below, editing where appropriate:


/*
Theme Name: Twenty Thirteen Child Theme
Theme URI: http://wordpress.org/themes/twentythirteen
Description: Twenty Thirteen Child Theme
Author: WPKube
Author URI: https://www.wpkube.com
Template: twentythirteen
Version: 1.0.0
*/
@import url("../twentythirteen/style.css");

/* ————Theme customization starts here ————-*/

The most important parts of this code are the Template and @import lines, so make sure these are filled in correctly.  Watch out for theme folders that start with a capital letter, as the code is case sensitive – it needs to be typed exactly. The rest of the information can be completed as you choose and you can even leave everything but the Theme Name and Template blank if you’re feeling lazy.

Using the @import rule is also not necessary if you’re planning on completely rewriting the entire CSS rules of the parent theme.

After you’ve created your skeleton CSS file, you can upload your new theme by compressing it into a .zip file and uploading it via the WordPress dashboard, under Appearances > Themes. Alternatively, you can upload the files into your newly created child theme folder via FTP. Once the files are uploaded, you can edit them from within the WordPress Dashboard (under Appearance > Editor). Before you can use your new child theme, you must also remember to activate it.

If you’re not in the mood for messing around with FTP, there’s a handy plugin that does all the setup for you: One-Click Child Theme. After installing the plugin, make sure the parent theme you wish to work with is activated and then just click on the “Child Theme” option under Appearance in the WordPress dashboard. The plugin will ask you for the theme name and other details and on clicking “Create Child” it will then create a new directory and pre-filled style.css file for you automatically.

Editing a Child Theme

Once you’ve created the basic structure of your child theme, the fun really begins and you can edit its appearance and functionality to your heart’s content.

As the only mandatory file in a child theme is style.css, it should be pretty obvious that editing the CSS is a good place to start. Any code you create in your child theme’s style sheet will override the style sheet of the original parent theme. You’ll probably want to grab a copy of the original CSS for reference so you can cut and paste sections and edit as required.

The functions.php file is also a common file to be included in child themes. Rather than overriding the original, this file is loaded before the parent functions.php file. It’s important to be aware of this so that you don’t duplicate code or create two functions with the same name.

Your functions.php file should start off looking something like this:

<?php

//functions go here

?>

If you want to replace the original functions from the parent theme with different code, you can use the following code to do so:

if (!function_exists('func_name')) {
function func_name() {
//do something
}
}

Style.css and functions.php are the main files that are used in child themes, but any of the original themes files can be overridden by creating a file of the same name within the child theme. It’s also possible to add new files, for example if you wish to create a new kind of page template that’s not included in the parent theme.

WordPress will use its standard hierarchy rules when working with child themes, so it will look for files within the child theme folder first and if it doesn’t find them, it will then try to find them within the parent theme.

When Not to Use a Child Theme

Child themes are incredibly useful but they’re not the optimal solution for every situation. Here are a few cases where a child theme is probably not what you should be using:

  • Making basic CSS changes. It’s overkill to use a child theme for a few basic changes like altering colors or changing fonts. In this case, it’s easier to use a custom CSS plugin like this one to make your changes.
  • Changing something that’s editable within the theme options. Theme frameworks and some basic themes often include extra functionality within the dashboard to make basic changes such as editing the color template, removing the header image or changing the number of columns. If this is possible using the theme you have chosen, there’s no need to create a child theme.
  • Completely changing the structure and/or functionality of the parent theme. The parent theme should provide the foundation for your theme. If you’re using a child theme to overwrite nearly all the files in the original theme, you’re probably better off either creating a new theme from scratch or finding another theme to tweak that meets your requirements better.

Conclusion

Don’t be intimidated by the idea of child themes. Creating one may sound at first like a highly technical task for hard-core WordPress developers, but it’s actually very simple to do as long as you have a little knowledge of CSS and possibly PHP.

Child themes are also a great way to get your feet wet in the world of WordPress theme design and give you the peace of mind that you can screw up as many times as you need to and you’re at no risk of breaking your site.

If you have any other tips for using child themes, please share them in the comments.

+ Share
Disclosure

Rachel Adnyana

Rachel is a web-developer-turned-writer who has successfully convinced many clients to switch to WordPress over the years. She blogs about her life as an expat in Bali at How to Escape.

Related Posts

Back to all articles
  • KadenceWP Theme Review!

    Kadence Theme Review (2025): Is It The Right Theme For You?

  • elegantthemes review

    Elegant Themes Review: Is it Still Worth The Money? (2025)

  • Divi Theme Review!

    Divi Theme Review: Should You Use It? (2025)

Coupons

View more deals
  • 10% OFF

    Elegant Themes Coupon

    You can’t move within WordPress circles without coming across E
    Get This Deal
  • pressable logo
    15% OFF

    Pressable Coupon

    If you’re looking for a high-quality managed WordPress hosting
    Get This Deal
  • Teachable Coupon Code
    10% OFF

    Teachable Coupon

    Building an online course business requires the right platform to
    Get This Deal
12 Comments Leave a Reply
  1. Robert Reed says

    February 20, 2014 at 3:20 pm

    Great tutorial! I think, for most of the beginners it is hard to understand what child themes are and how to set them up.

    Reply
    • Rachel Adnyana says

      February 22, 2014 at 7:24 am

      Thanks Robert! Yes I think a lot of people are intimidated at the idea of child themes but they’re very simple to set up

      Reply
  2. Russell Cohen says

    February 21, 2014 at 10:45 am

    You said “Style.css and functions.css are the main files that are used in child themes…” Did you mean “functions.php”?

    Reply
    • Devesh says

      February 21, 2014 at 4:39 pm

      Just fixed the typo — it should be functions.php.

      Thanks for pointing that out, Russell.

      Reply
    • Rachel Adnyana says

      February 22, 2014 at 7:25 am

      Good catch Russell! And I see Devesh already beat me to the edit 🙂

      Reply
  3. Sheri says

    February 22, 2014 at 5:06 pm

    For simple CSS-only changes, what do you think about the CSS Editor in Jetpack?

    Reply
    • Rachel Adnyana says

      February 23, 2014 at 8:43 am

      I’ve not actually tried it out as up until now I’ve mainly used the css editor that’s included with the Dynamik website builder. I heard in the past that Jetpack conflicted with some other popular plugins – i may have to do some research and experiment a bit 🙂

      Reply
  4. Arup Ghosh says

    February 28, 2014 at 4:24 pm

    Nice guide. It will be great if you share something about developing genesis child themes. I’m a newbie and wnat to develop a custom child theme for my blog.

    Reply
  5. Arup Ghosh says

    February 28, 2014 at 4:24 pm

    Nice guide. It will be great if you share something about developing genesis child themes. I’m a newbie and want to develop a custom child theme for my blog.

    Reply
  6. Alison Palmer says

    October 7, 2015 at 5:31 pm

    very helpful. Thanks

    Reply
  7. Chitrapathi says

    January 11, 2016 at 10:04 am

    Hi, very nice and informative guide. Really I planned to do with child themes but I didn’t get any ideas but you now I get more informative tips by your blog. Thank you for this nice piece of post and keep blogging like this. Well, I noted that you focus mostly on WordPress. That’s really nice I loved your all topics.

    Reply
  8. Cajsa Unnbom says

    August 8, 2016 at 9:21 pm

    As someone who’s used to CSS and HTML but unfamiliar with PHP and Javascript, I feel a little less intimidated by the idea of WP theme development and ready to get started. Thank you for a helpful guide.

    Reply

Leave a Reply Cancel reply

Full Disclosure This post may contain affiliate links, meaning that if you click on one of the links and purchase an item, we may receive a commission (at no additional cost to you). All opinions are our own and we do not accept payments for positive reviews.

Our Newsletter

Get awesome content delivered straight to your inbox.

Thank you!

You have successfully joined our subscriber list.

.

THE BEST OF WPKUBE

Some of the best content we have published so far.

BEGINNER GUIDES & REVIEWS

110 Best WordPress Hosting Options for 2025 (Pros & Cons)
28 Best Managed WordPress Hosting Providers for 2025 Compared
38 Best Cheap WordPress Hosting Providers in 2025 (From $1.99)
46 Best WordPress LMS Plugins – Detailed Comparison & Review for 2024
55 Best WooCommerce Hosting Providers Compared in 2024 (All Budgets)
66 Best WordPress Landing Page Plugins Compared + Recommendations (2024)
79 Best List Building Plugins for WordPress In 2024
8How to Fix the 500 Internal Server Error on Your WordPress Website
9Beaver Builder Review: Honest Thoughts + Pros and Cons (2025)
10OptimizePress Review: Create Landing Pages with Ease
11How to Make a Website: Complete Beginner’s Guide
12Top 22 Best Free Stock Photo Resources For Your Site
13How to Start a Blog in 2022 (Step by Step Guide)
14How To Fix ‘503 Service Unavailable’ WordPress Error
1511 Best Contact Form Plugins for WordPress in 2025
16How to Add a Custom Logo to Your WordPress Site
17How to Fix Error Establishing a Database Connection in WordPress

WPEngine: 50% OFF Deal

Save 50% on one of the best managed hosting providers.

Get this Deal
Featured In Forbes Huffpost Entrepreneur SEJ

About WPKube

WPKube is an online WordPress resource which focuses on WordPress tutorials, How-to’s, guides, plugins, news, and more. We aim to provide the most comprehensive beginner’s guides to anything about WordPress — from installing plugins, themes, automated installs and setups, to creating and setting up pages for your website.

We have over 500+ tutorials, guides, product reviews, tips, and tricks about WordPress. Founded by Devesh Sharma, the main goal of this site is to provide useful information on anything and everything WordPress.

Twitter Facebook

Useful Links

  • Behind the Scenes
  • Beginner Guides
  • WordPress Hosting
  • WooCommerce Themes
  • MeridianThemes
  • Exclusive WordPress Deals
View All Guides »

Reviews

  • WPEngine 33% OFF
  • WPX Hosting
  • Flywheel 33% OFF
  • Divi Theme 20% OFF
  • Systeme.io
  • Elegant Themes
Reviews »

Deals

  • InMotion Hosting
  • LifterLMS Coupon
  • LiquidWeb Coupon
  • WPEngine Coupon
  • A2 Hosting
  • Solid Affiliate
More Deals »
© Copyright 2023 WPKube ® All Rights Reserved.
  • Contact
  • Site Terms
  • Disclosure
  • Privacy Policy