You can use a conditional tag.
Heres a working example.
<?php if ( in_category(5) ) {
echo '<span class="my-cat-5">This is a nice category</span>';
} else {
echo '<span class="bad-cat">This is a BAD category</span>';
}
?>
Where 5 is the special category and then you can add speceifc style in the your stylesheet using the my-cat-5 style. You’ll of course want to copy the contents of you old single post loop in between the span before and after the else. If you would like to copy the contents of your single post page here if you have any trouble then I can show you what you need.
I am trying to upgrade a blog from 2.0.4 to 2.3.3. I have used the post-templates-by-category plugin. While it works in displaying the posts, I am having a problem in 2.3.3 in editing or creating posts. When hitting the Publish button I receive the following error:
Warning: Cannot modify header information – headers already sent by (output started at ../wp-content/plugins/post-templates-by-cat.php:96) in ../wp-includes/pluggable.php on line 390
Also received the same error when trying to deactivate the plugin, so had to rename it.
There is not any mention of this plugin in the list of those that work or don’t work with 2.3 – so I don’t know if it is still supported. I thought the problem might be with my template, but I tried it with the default template and received the same error.
It does not seem like there is any other plugin that will do the same thing. Anyone know what could be wrong or if there is a new plugin that works?
Did a little more searching here on pluggable.php and as a result edited the post-templates-by-category.php file to delete an extra space at the very end. And now it works.
I believe I have the solution you are looking for. I needed the same functionality so… here’s a link to post on my site.