Pin Me

Wordpress Child Theme Concept Explained

written by: Bruno Kos•edited by: Michele McDonough•updated: 6/30/2011

If you ever wanted to ease the process of WordPress theme creation, you might want to familiarize yourself with the basics of the WordPress child theme concept. Read on to learn more about this concept.

  • slide 1 of 6

    With the arrival of WordPress 2.7, the popularity of WordPress child theme concept has begun to increase. That did not happen only because of better support. Instead, this occurred mostly due to what the WordPress child theme concept represents. On its simplest level, this concept is based on parent and child themes. The developer creates a parent theme, which is used further as a basis for the child theme. This article will further explain what this concept is and will mention its benefits.

  • slide 2 of 6

    This is Templating, Isn’t It?

    Experienced WordPress developers not familiar with the child theme concept might conclude that what is mentioned in the introduction can be simply achieved by modifying theme files of the parent theme. There is nothing wrong with this attitude, as the desired actions can be achieved in this way. Where does the child theme concept fit in then?

  • slide 3 of 6

    No Regular Time Consuming Edits

    Consider the case where developer created a child theme by making simple edits of the parent theme (created by another author), while keeping its complete functionality. For example, the smaller changes might concern the font color and size, changes to padding and margins, etc. Furthermore, an author of the parent theme decides to add some new functionality, but the developer of the child theme would like to see those changes implemented as well. In order to avoid a hassle concerning thorough changes, the child theme concept is an excellent solution.

  • slide 4 of 6

    So How Does It Work?

    In order to use the benefits of this concept, it is required to take the parent theme and to create a new child theme by performing the desired modifications on the parent. Furthermore, this new theme should be placed in its own folder. Once the new version of the parent theme is released, it is only required to upgrade it with updated files, while the files of the child theme would stay intact. Naturally, new functionality and features will also apply to the child theme.

  • slide 5 of 6

    How to Choose a Parent Theme?

    Every theme can be used as a parent, even the simplest one. As mentioned previously, it is only required to put the parent into the wp-content/themes/, while the child theme is also supposed to be in its own folder situated in wp-content/themes/. In other words, this concept does not imply that child theme should be situated in the folder of the parent theme.

  • slide 6 of 6

    Conclusion

    The brilliance of the WordPress child theme concept lies in the fact that the developer can have one parent theme and several child themes based on that parent, while all these child themes differ significantly. In order to fix errors or to perform upgrades to a complete set of themes, it is only required to modify the parent theme and the changes will apply to all the child themes. This concept also simplifies the process of advanced theme creation, as any advanced theme can be used as a basis, while with either simple or advanced CSS edits, a new (child) theme may differ significantly from its parent, while retaining its advanced features.