It looks like Child Themes will be able to override templates in Parent Themes and add new custom page templates in WordPress 2.7. I loaded up the bleeding edge version this morning and tried it out. Works like a charm. Thank you to everyone who helped make this possible. This might just change the way WordPress theming gets done and will certainly make a lot of people’s lives a whole lot easier.
28 thoughts on “WordPress 2.7 Theming May Change Everything”
Ian, I’ve been hearing about child themes for a little while now but it isn’t really sinking in as to why they are a good thing.
I have only just started using other people’s themes as up until now I always coded my own by I am changing it quite a lot. Is the idea of child themes that theme authors will be encourage to start versioning and refining themes as one or two of the premium theme authors do?
2.7 sounds like it’s going to be an important release for wordpress, can’t wait!
P.S. Usually you’d hear the benefits of ‘child themes’ for wordpress talked about all over in the wp community, I don’t think a lot of people understand the benefits Ian, care to elaborate?
@Andrew: The big benefit—in my mind—comes from easy upgrades to the theme. If I have a 100 client sites I’m managing and WordPress 3.2 comes out, I’d have to hunt through the code of a 100 sites and multiple template files looking for stuff to worry about. If those clients are using child themes to skin a carefully coded parent theme and maybe add some custom HTML or what have you, I just have to worry about the parent theme. One theme, a 100 sites.
No slight intended against premium theme developers, but there are free themes that are just as carefully coded, versioned and refined as any premium theme—if not more so. Tarski, K2, Prologue, Monotone, Options and The Sandbox are all perfect examples.
@Ptah Dunbar: I’m not sure I can elaborate much more! Sometimes I feel like it’s all I’ve been writing about for the last two months.
You’ll start to see more and more written about using Child Themes as more and more people start using them creatively. Trust me on this one.
The ability to override certain templates using child themes, but not others in WordPress 2.7 will be huge. Thematic is a great parent theme with lots of hooks, but right now to customize certain things in your child theme you can only do it in functions.php (as outlined by Ian in another post recently).
For example, I’ve written custom 404.php templates in most themes I worked with so that sites I’ve converted from other systems can handle broken links gracefully. Usually, I just do a custom 404.php file and overwrite the one from the theme I’ve been working with, but with a parent theme that gets upgraded what if I forget and overwrite my custom 4o4.php file? I have to track it down from my backup and do that for every site where I’m using the parent.
I like the concept a lot and am only just now beginning to grasp all the possibilities. Every site is a little different and it adds a lot of possibilities to not have to do a completely custom theme for every site you work on.
Ah, Eurika! I had it backwards.
I have been trying to figure out how child themes would mean you wouldn’t have to touch the parent theme. It didn’t make sense to me because the parent theme seemed to be the main source of problems. But it is the other way round.
I can see why the more with-it theme developers will start to code with this kind of separation in mind.
@Andrew: I hope this’ll inspire some WordPress Fun then, Andrew. Always look forward to what you come up with.
Ian, your work has been a great resource for me as I quickly ramp up my knowledge of the “right” (smart) way to use WP. Thanks.
I’m about to enter the production phase on what will eventually be a pretty large WP site. In fact, I would already be in the production phase if it weren’t for my apprehensions about the insane release cycle and its effect on the upgrade process. Finally, it looks like Automattic is “getting it” with this functionality.
Two questions: 1) Are there scenarios in which you would still need to modify the parent theme directly, and 2) Can you post more on your experiences with 2.7, specifically, is it usable enough to start developing a new site in yet? Please use the phrase “child theme” at least 3 times in said post. ; )
@brandon – one scenario would be if you wanted to change core functionality in a parent theme you would have to actually modify the parent theme.
With CSS, you can “display:none” to sections you don’t want to appear, but say you want to actually change the way the title tag is generated, that would have to be modified from the parent theme.
@Brandon Jones: 1. Sure. Maybe. It depends on the parent theme. That’s one of the exciting things that might happen in theming. A sort of race to make the most extensible and cleanly coded theme. 2. I like to use betas for testing and whatnot but I wouldn’t use it for a live site. Some people do. You could try the WordPreciousss plugin in the meantime if you needed this functionality.
You can do some pretty crazy things with child functions.php as well – remember it works just like a plugin so you can filter pretty much anything.
I’d listen to that Matt guy. He knows what he’s talking about. 😉
Yes, I think one of the nicest things about WP is that themes are simply visually oriented plugins. I’ve only built one live site with WP so far, so my ignorance about what differentiates “core functionality” from other functionality (output that can’t be modified from functions.php only) is currently getting the best of me.
Good to know that 2.7 seems solid enough to develop on. Soon I’ll be contributing answers, and not questions. : )
I’m going to test out 2.7 – bleeding later today; I’m just as excited about this as you are, Ian.
It will also get a lot easier to help people customize themes; I don’t know how many times I’ve bumped into the “if I upgrade this theme all my changes will go away”.
There’s a lot of benefits not having to touch a theme’s core file to customize it.
This is it in a nutshell. Even for me—here on ThemeShaper. Why should I have to tweak some custom theme here when I make an awesome change to Thematic? I just re-upload Thematic and I get the changes too.
… Although I have used Thematic as a base theme for customization when I had to do some more custom work. But WordPress 2.7 would have made that customization quicker, easier and safer as I could have just edited 2 files.
You’re welcome; hopefully once 2.7 comes out, and it gets a bit more press (many thanks for helping with that), it will help and encourage people to keep on top of their theme upgrades.
I’m kinda curious why it doesn’t get more press. And/or why it hasn’t in the past. Outside of Scott Wallick, I haven’t found anyone talking about it.
Well, part of the problem may have been the serious limits on its functionality. Being able to use an extra stylesheet isn’t really a big deal; there are hundreds of ways of doing it without using a child theme. There’s also the question of which features are written up when new releases of WordPress come out. I think the important thing now is to ensure it’s properly promoted from here on out, and get some buzz around it before 2.7 is released in November. I was planning on writing it up in a little detail, and if other people do the same, perhaps the idea will take hold.
Benedict Eastaugh’s thoughts on Child Themes in WordPress 2.7.
I am a WordPress newbie with advanced beginner XHTML/CSS knowledge and having a fun learning experience. This has also brought me into the world of PHP where I am a total newbie beginner.
I have installed WordPress 2.6 on a hosted server and it works as it should. I have installed the ‘Thematic’ template and created a ‘child theme’ containing a functions.php and style.css files. What a great invention. Works brilliantly.
Now I want to change the right column . . . hmmmm. I gather from your post and the comments that WP2.7 may well preclude the need to edit core theme code and replace it with my own HTML and PHP. and if I understand what you have said that I might be able to use some code in functions.php to also accomplish that as well.
Can you steer me in the right directions on how to accomplish via functions.php?
Many thanks to the pioneers.
If you want to change the contents of the right column, it’s widgetized. If you want to change it’s position, you can use CSS. There’s some sample styles in the Thematic theme directory.
Hi Ian, I’m a new subscriber to your blog and now a fan of your work. Reading the tutorials and concepts behind child themes for WP opens up so many possibilities to those of us who are stronger at graphic design than coding. I can’t wait for WP 2.7 to be released. Also thx for all the detailed info and inspiration!
No problem, Marti. Thanks for letting me know, you’re reading along!
Does this mean you can use one theme for the home page, and another theme’s look for the single page?
There’s a discussion about combining WP child themes (in this case Sandbox, although I plan to use Thematic as well) with the Blueprint CSS framework on my blog here: http://www.arciris.com/latest/design/creating-wordpress-themes-with-blueprint-and-sandbox/ – I wasn’t going to comment here as I thought it was a bit spammy but as you say that people are not really talking about this Ian, I thought I’d chip in my 2 (euro) cents. 🙂
Hi there Ian. I’ve been dabbling with WordPress for a while now, but didn’t know anything about child themes or thematic! Can’t say how pleased I am! This will make WordPress really fun! 🙂
Comments are closed.