<?php
if(!in_category('5')) {
// If not in category with the ID 5...
YOUR COMMENTS CODE
}
?>
NOTE: You might need to use is_category as appose to in_category..
Or create a file called category-5.php and exclude the comments code (as in, just leave it out)…
In both cases change the 5 to the ID of the category…
Rel:
http://codex.wordpress.org/Template_Hierarchy
http://codex.wordpress.org/Conditional_Tags
(@jbickers)
14 years, 10 months ago
Looking for the easiest/most goof-proof/most upgrade-friendly way to hide the comment functionality on all posts in a specific category … thanks in advance!