Turn off comments by default for WordPress posts and pages

Comments are a great way to get your site visitors to interact with your site, but there may be some cases where you want these switched off, especially when you're not using WordPress for blog purposes. This article looks at how to switch off comments in different scenarios, including the default setting for posts and pages.

Turn off comments on a single page

Turning off comments for an individual page can be done in the WordPress admin panel with these steps:

  • Go to the page you want to disable comments for in the 'Pages' section
  • Click on 'Screen options' at the top and select 'Discussion'
  • Scroll to the bottom of the page and uncheck 'Allow comments'

Turn off comments by default for all pages 

If you want to disable comments site wide you can use the settings discussed in the next section, but if you only want to disable comments on pages but not posts then you'll need to remove or comment out the following line from the page.php template file (found in \wp-content\themes\%theme_name%) like so:

<?php //comments_template(); ?>

Note that custom themes may use other template files for your pages, so you might want to search the code for 'comments_template' to make sure you find all instances.

Turn off comments for a single post

Similar to a page, turning off comments for an individual post can also be done in the WordPress admin panel:

  • Go to the page you want to disable comments for in the 'Posts' section
  • Click on 'Screen options' at the top and select 'Discussion'
  • Scroll to the bottom of the page and uncheck 'Allow comments'

Turn off comments for new posts and pages

To turn off comments for new posts and pages:

  • Go to Settings >> Discussion
  • Uncheck "Allow people to post comments on new articles"
  • Click 'Save Changes' at the bottom.

Turn off comments on existing posts:

The above won't affect posts that you've already created, so if you also want to disable existing posts follow these steps:

  • Go to your posts
  • Check the box to select all posts
  • Under 'Bulk Actions' click edit and then apply
  • On the 'Comments' drop down change this to 'Do not allow' and click update

If you want to remove all the old comments too, then go to the 'Comments' section, check the boxes (top checkbox selects all), under 'Bulk Actions' you can move them to trash or unapprove.

Sign Up
comments powered by Disqus
Sign Up

Popular Tags

350x250

Need a web developer?

If you'd like to work with code synthesis on your next project get in touch via the contact page.