Understanding the Basics of Child Themes in WordPress

There are two types of themes within the WordPress ecosystem, and these are parent themes and child themes.

In order to understand how to use the Genesis Framework for building your websites, youll need to first understand the difference between parent and child themes, and how they work together to create the beautiful blogs and websites you see on the web today.

The Basics of Parent Themes

In most cases, youll see parent themes referred to as just WordPress themes. In fact, any WordPress theme you purchase or download (for example, from ThemeForest) can be used as a parent theme in a parent-child theme relationship, but this is not required for it to function.

Another way to put it is to say that a parent theme can function on its own, or it can have a child theme in relation to itself.
Child Themes Explained

A child theme is different from a parent theme in the sense that it cannot function on its own. A lot of people will describe child themes as styles or skins of a parent theme, and this is quite accurate.

Have a parent theme? You can install it and everything will run as planned. But with a child theme a specified parent theme is required to be installed in order for that child theme to have an effect.

This is seen when you purchase the Genesis Framework from StudioPress. Youll notice that many of the other themes on the site look good, but none of them will work unless you have first purchased and installed the Genesis Framework first.

Thats because the Genesis Framework is the parent theme, and all the rest are child themes of that parent theme.
Whats Happening With a Child Theme?

This is important to cover, since youll be creating all your future Genesis Framework themes as child themes.

Basically, when you install the Genesis Framework, youre good to go! Of course, nothing looks fancy or special, and thats because you have installed a framework—its a starting place for the design to happen.

In order for your blog to take shape, youll have to create another theme as a child theme that overwrites and adds to the functionality of the parent theme.

If you create a file in your child theme that is present in the parent theme, your child theme version will take precedence and be loaded instead.

This is true for every file except a special one, and thats the functions.php file. Instead of overwriting the parent functions.php file, it is simply added to the end of the parent themes version.

This allows for added functionality, but prevents a child theme from breaking a parent theme (lots of important functions in this file!).

Much of the magic happens within the style.css file, where you override the default styling of the parent theme and make your new child theme look like its own. You could actually create an entirely different looking theme by just adding a child theme with only a style.css file.

If a file thats required isnt found in the child theme, the parents file will be loaded by default. There is only one file required for a child theme, and thats the style.css file.