It'd be great to be able to set templates in the single.php file so that blog articles, not only pages, can be styled according to preset templates.
It'd be great to be able to set templates in the single.php file so that blog articles, not only pages, can be styled according to preset templates.
You mean that you'd like to be able to select a template for a post just like you can set a template for a page? I can see some sense in that. For example if you have normal blog posts, but also recipes, I can imagine that it would be useful to be able to select the template 'recipe' when writing a new recipe.
On the other hand, those templates will have to be defined by a theme designer anyway. For the theme designer, it is perfectly easy to style posts in a certain category differently (using conditional tags like in_category). For the end user, selecting the right category (recipes, in my example) may be even simpler than selecting a certain template.
I've written a plugin to do just this: Custom Post Template plugin
The plugin is a great idea, but I would like to see this considered for also possibly being put into the actual core one day.
I'm not sure if this will be looked at for core, you'd have to speak to someone like Jane, or a core developer. But in general, I'd agree, if you can do it with a page, why can't you do it posts? - I am aware there are some themes that have created this functionality straight into the theme, which is powerful, but for the time being, you can't go wrong with that plugin! :)
I also recommend Simon's plugin. The functionality is great, but a little niche, so it stays in themes and plugins for now.
This topic has been closed to new replies.