Try using <?php if (in_category('x')) : ?>
wow thanks man worked like a charm!
I wanna do the same thing, hiding comment box on certain category.
But I cant find this code to change
‘<?php if (is_category(‘x’)) : ?>
<?php else : ?>
<?php comments_template(); ?>
<?php endif; ?>’
Where do I find it? thanks
You may have figured it out by now, but it’s in the Single Post template (single.php) toward the bottom. Paste the above code in place of <?php comments_template(); ?>
(@adilomar)
14 years, 5 months ago
hi guys,
iam trying to hide the comments box on certain category, so the user cannot comment on the posts which fall in that category
i tried
‘<?php if (is_category(‘x’)) : ?>
<?php else : ?>
<?php comments_template(); ?>
<?php endif; ?>’
buts its not working, anyone got solution for this?