/  

Blog

Don’t leave yourself behind. Stay up to date with the latest design trends, our new products,
updates, WordPress news, and special programs right on the blog!

childtheme

How to use a WordPress child theme

What is a WordPress Child Theme?

A WordPress child theme is a theme that inherits all styles and functions from another WordPress theme, the parent theme. And this is the place where you can make changes without getting overridden when you update your parent theme.

Why Child Themes are so important?

If you modify a theme directly and it is updated, then your modifications may be lost. For example, using the Upside WordPress theme version 1.0.0, if you have made changes to the files in Upside 1.0.0, and when you update the theme to 1.0.1, all the changes will be deleted and you have to start all over again. So it’s really convenient when we make all changes in a child theme.

How to create a Child Theme

Many of our WordPress themes, especially the recent ones, do include a child theme zip file inside the theme download package so you can use it right away without creating a new child theme. If the theme doesn’t have, read this guide from the WordPress Codex or you can follow these simple steps to create a child theme within minutes.

  1. Step 1:The first thing you need to do is create a new folder for your child theme (eg. “upside-child”) under the wp-content/themes folder. Look at the image below:
  2. create a child theme

  3. Step 2: Inside the child theme folder, create a CSS file with the name style.css.
  4. The stylesheet must begin with the following (the stylesheet header):

    style file

    • Theme Name (required) = use the parent theme name + child to make it easy to identify (eg. “Upside Child”)
    • Theme URI (optional) = your theme link
    • Author (optional) = your name
    • Author URI (optional) = your website link
    • Template (required) = name of the parent theme folder (in this case, it is “upside”)
    • Description (optional) = you may enter any text here
    • Then you may add any additional custom CSS as you want under the @import url (“../upside/style.css”); line. If you write above the line, your website won’t inherit the functionality of the parent theme.
    • Step 3: Create a functions.php file. Open up a new text file, and place the following code in the top of it:
    • php child theme

      Save that file into your child theme folder with the name functions.php.
      You should now have two files in your child theme folder: your style sheet file and your functions file.
      child theme folder

    • Step 4: Zip your child theme folder.

How a Child Theme works?

The ways to active a child theme is exactly the same as those for any other theme. Log in to your site’s administration panel, and go to Administration Panels > Appearance > Themes. Upload the zipped copy of your child theme to your site and activate it.

activate child theme

Note:

  • You may need to re-save your menu (Appearance > Menus, or Appearance > Customize > Menus) and theme options (including background and header images) after activating the child theme.
  • Do not delete or rename the parent theme folder.
  • If you want to modify any file, simply copy it from the parent theme folder to the child theme folder.
  • Always write CSS below the @import line.

A full-time online marketer, WordPress writer at Kopasoft, a devotee to anime, astronomy, and fun eccentric ideas maker. Don’t bother dropping her a line for everything you’re concerning about.

Leave a Reply

What people say?

lmoenat

This is a great and wonderfull theme, i was worried because the design look so professional but the manual make everything easy. Thanks Guys! you make a wonderfull job, KOPA Themes is my favorite!

armisha

Great theme and very professional support team that is very quick to help in anything concerning the template.

Subcribes Newsletter