CHAPTER 5: THE CHILD THEME CONCEPT
AS A WORDPRESS designer, one of the things that 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 functionality of more modern themes. And the question is, will it still work in another few years? Backward compatibility in WordPress is pretty extensive, but there is a limit.
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 that you create another step from the code because the child theme will consist mostly of visual enhancements and changes to the parent theme. This 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 effectively for your own projects.
THE BRILLIANCE OF CHILD THEMES
Child themes let you create themes that rely on other themes, called parent themes, as templates, by changing parts of the parent theme to suit your own needs. For example, say you love a particular theme but dislike the fonts and colors. You may also think that it needs a few Page templates to meet your needs. There are two ways to tackle this problem. The most obvious method is the direct route: ...
Get Smashing WordPress: Beyond the Blog, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.