How to create a child theme in WordPress, full tutorial.

This article was written by in March 1, 2014, & may not be posted on other sites!
Original source url for this article: How to create a child theme in WordPress, full tutorial.

How to create child theme WordPress?
In this article you will learn how easy it is to create a custom child theme in WordPress.

 

How create a child theme in WordPress?

It is easy, all you really need to get started is ONE single file, the main css-file mostly known as style.css. here are som easy steps to create a custom childteme in wordpress:

  1. Create a CSS file in a text editor and add the following code at the top:
    /*
    Theme Name: childtheme-twentyfourteen
    Theme URI: http://www.mysite.com
    Description: Custom child theme for the Twenty Fourteen theme
    Author: Firstname Lastname
    Author URI: http://www.mysite.com
    Template: twentyfourteen
    Version: 0.1.0
    */
    @import url("../twentyfourteen/style.css");
  2. Fill in your custom theme name, author and so on. Save the file as style.css inside a folder. You can name the folder the same as your childtheme name, for example “childtheme-twentyfourteen”. Add all your custom CSS inside the style.css. If you have another parent theme other than twenty fourteen, just replace the name “twentyfourteen” to whatever parent theme you are using.
  3. Make sure you have the parent theme installed on your WordPress site, in this case we are using twenty fourteen as parent.
  4. Upload the folder “childtheme-twentyfourteen” to your wordpress site in wp-content/themes/.
  5. In your WordPress admin, go to appearance > themes to find your new custom childtheme.
  6. Activate it! You are done!
  7. Now you can start altering your custom style.css file, and also add all the other files you wish to alter such as templates, functions.php or whatever. Just copy and paste files from your parent theme into your childtheme and edit them as you wish.

 

Download full childtheme to get you started fast & easy!

The following zips contains the style.css, a custom jQuery file, functions.php, a screenshot, and 1 page-template. Just download and install the theme on your site, activate it!
(make sure to change the path to your site url in the functions.php)

Childtheme with Twenty Fifteen as parent

Childtheme with Twenty Fourteen as parent

Childtheme with Twenty Thirteen as parent

Childtheme with Twenty Twelve as parent

 

 

What is a child theme in WordPress?

WordPress comes with one or several default themes within the basic WordPress installation. In addition to that you can also download thousands of free WordPress themes of all kinds at:
http://wordpress.org/themes/
A child theme is a custom theme that uses any other theme as a parent. The files in the childtheme will always override the parent themes files. This means you have a complete base theme as a foundation with all the functionality allready there, and your childtheme only need to contain the files, css or templates you need to alter, nothing more. A childtheme is much less time consuming than a custom theme built from scratch.

 

Why create a child theme in WordPress?

You should always create a custom theme or a childtheme when working with custom solutions in WordPress. There are many reasons:

  • There is no risk of destroying functionality in a complete theme, even if you are a beginner.
  • You can update the parent theme to always have fresh code, without risking loosing data or getting not wanted overrides.
  • A child theme will separate your custom code from the parent theme code.
  • There is less risk of conflicts between librarys and functions.

 

Spread the word

Facebooktwittergoogle_pluslinkedinmail

Leave a Reply

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