Disabling comments

I’ve now lost count of the number of times I’ve wanted to know how to disable comments on pages, but leave comments enabled on blog posts. So I thought I’d start to keep a record here.

The method seems to vary with which theme is being used. Currently I’m using the twenty-ten themes, and here unchecking the “Allow people to post comments on new articles” box in the Settings/Discussion page turns off comments on all new items.

To do it on for pages but not posts, what seems to work is editing /public_html/wp-content/themes/twentyten/loop-page.php and commenting out the comments_template line like this:

<?php //comments_template( ”, true ); ?>

I’ve no doubt I’ll return to this post and refine it when I change themes, or upgrade WordPress to the next release.

This entry was posted in Uncategorized. Bookmark the permalink.