WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Disabling comments for a certain category.

[Resolved] Disabling comments for a certain category.

Viewing 3 replies - 1 through 3 (of 3 total)
  • One option: Consider making 2 Category_Templates. One named archive.php and one named category_x.php, where “x” is the id of the category you don’t want to have comments.

    The two files could be identical except that archive.php would have the comment code and category_x wouldn’t.

    Follow that link for category_templates to learn more. A glance at Template_Hierarchy probably wouldn’t hurt either. 🙂

    Thanks, I will. Thank you very much.

    If you are wanting to display past comments, but turn off future comments. In the comments.php file you can use conditional statements (if, else) and the in_category() function to detect the category. By doing this the previous comments will display and for the categories with closed comments you can add a message notifying the reader that the comments have been closed.

    One more idea in case it helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Disabling comments for a certain category.’ is closed to new replies.
Skip to toolbar