O'Reilly logo

Smashing WordPress: Beyond The Blog by Thord Daniel Hedengren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. THE CHILD THEME CONCEPT

As a WordPress designer, one of the things you need to keep in mind is the addition of new features with new versions of WordPress, and in turn the deprecation of old ones. A theme created a few years ago will probably still work, but it will definitely be lacking some of the newer functionality of more modern themes. And the further question is, will it still work in another few years? The backwards compatibility in WordPress is pretty extensive, but there's a line to be drawn, of course.

Compatibility is one of the many reasons why you create core themes to build on, and why using child themes to extend them is such a great idea. In a way, the child theme concept is all about moving the individual styling for the sites you create another step from the code, since the child theme will consist mostly of visual enhancements and changes to the core theme. That means that the user can update the core theme without breaking anything.

This chapter is dedicated to the brilliance of child themes and how you can use them for your own gain and projects.

The Brilliance of Child Themes

Child themes are a fairly new concept that started blooming with WordPress 2.7, where the support for them was greatly improved. Basically, you create themes that rely on other themes as templates (mother themes, if you will), and that in turn means that you'll only have to change the things you dislike in the child theme (see Figure 5-1).

For example, say you love a particular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required