Disable comments on all posts/pages

Is there a quick way to disable all comments on all posts and pages. I know that you can go into the dashboard under posts, click edit, and Do Not Allow, under comments. Is that the only way?

5 s
5

The check if comments are enabled is performed by comments_open() function.

You can make it always return false via a filter with something like this:

add_filter('comments_open', '__return_false');   

Other way would be to make comments available to only registered users (that is if you don’t have open registration) in Settings > Discussion.

Leave a Comment