I am excluding comments from specific categories. However, when I try to exclude more than one, it doesn’t work.
This works: <?php if (!in_category('7')) comments_template(); ?>
This does not work:
<?php if (!in_category('7 , 9')) comments_template(); ?>
or
<?php if (!in_category('7')) comments_template(); ?>
<?php if (!in_category('9')) comments_template(); ?>
I would suggest using category slugs instead of ids. Please try something like this:
Put the IDs into an array, like this:
<?php if (!in_category(array(7, 9))) comments_template(); ?>