I want to add a file to the template hierarchy. I want to be able to customize the single.php for a specific category.
For example if my category is "news" and single-news.php exists, you'll hit that before going to single.php.
Is this doable?
I want to add a file to the template hierarchy. I want to be able to customize the single.php for a specific category.
For example if my category is "news" and single-news.php exists, you'll hit that before going to single.php.
Is this doable?
Check out this plugin: http://guff.szub.net/2005/07/21/post-templates-by-category/
I think it'll do what you're after?
Ah yes! That looks like it'll do it.
I wonder if it works with 2.3 though because of the category references? Was "get_the_category" deprecated?
Category's are still in WP 2.3, so as long as it uses functions and not direct SQL, I'd think it'd be ok?
Indeed!
This topic has been closed to new replies.