But what about posts (under the single.php)?
If you'd like simulate the capability of creating a different template for Page Templates, then this plugin (Single Post Template) could be your best bet. Templates can only be assigned on a per post basis. So you have to edit your earlier posts that you want to be displayed in your new specific template.
I have some reservations for this method, though, as this is a plugin in the first place. What if I upgraded and it isn't compatible with the future versions of WordPress anymore.
But, if you want to display a different template for each post under a certain category, and to affect all posts previously posted filed under the same category, then these hacks could do well:
There's a caveat with the last item, though; to wit:
Like I mentioned earlier, if you are in the habit of filing posts under multiple categories, this code probably won’t work as intended. Since we’re working with templates for use on single posts in single categories, posts in multiple categories may end up falling back to the default single.php template. You have been warned!
No comments:
Post a Comment