Comments can be an excellent way to foster engagement and feedback on your WordPress posts. However, there might be times when you want to disable comments, either due to excessive spam, a desire for a cleaner look, or any other reason. In this article, we’ll explore multiple methods to disable comments in WordPress, ranging from built-in options to plugin solutions.

1. Disable Comments on Future Posts

The simplest method to prevent comments on your future articles is by adjusting the default settings:

  1. From your WordPress dashboard, navigate to Settings > Discussion.
  2. Under the Default post settings section, uncheck the box that says “Allow people to submit comments on new posts”.
  3. Click Save Changes.

Remember, this method will only affect new posts. Existing posts will still have comments enabled.

2. Disable Comments on Individual Posts or Pages

If you only wish to disable comments on specific posts or pages:

  1. From the WordPress dashboard, go to Posts or Pages and select the post/page you want to edit.
  2. Under the Document settings on the right, find the Discussion section. If it’s not visible, click on the three dots (options) at the top right corner and ensure Discussion is checked.
  3. Uncheck the “Allow comments” box.
  4. Update or Publish your post/page.

3. Bulk Disable Comments on Existing Content

To disable comments on multiple existing posts or pages at once:

  1. From the dashboard, navigate to Posts or Pages.
  2. Select the posts/pages using the checkboxes.
  3. From the Bulk Actions dropdown, select Edit and click Apply.
  4. In the bulk edit box, find the Comments dropdown and select Do not allow.
  5. Click Update to apply the changes.

4. Completely Disable Comments Site-wide

If you want to ensure comments are disabled across your entire site:

  1. Navigate to Settings > Discussion.
  2. Uncheck “Allow people to submit comments on new posts”.
  3. Below this option, you’ll find a setting titled “Automatically close comments on posts older than X days”. Set this to “0”.
  4. Click Save Changes.

5. Using a Plugin to Manage Comments

There are several plugins that can help manage and disable comments. One of the most popular is “Disable Comments”. Here’s how to use it:

  1. Install and activate the Disable Comments plugin.
  2. Go to Settings > Disable Comments.
  3. You can choose to disable comments everywhere or selectively by post type.
  4. Select the desired option and click Save.

6. Disabling Comments via Code

If you’re comfortable editing your theme’s functions.php file, you can add the following code:

<?php
// Disable support for comments and trackbacks in post types
add_action('admin_init', 'disable_comments_post_types_support');
function disable_comments_post_types_support() {
    $post_types = get_post_types();
    foreach ($post_types as $post_type) {
        if (post_type_supports($post_type, 'comments')) {
            remove_post_type_support($post_type, 'comments');
            remove_post_type_support($post_type, 'trackbacks');
        }
    }
}


// Close comments on the front-end
add_filter('comments_open', 'disable_comments_status', 20, 2);
add_filter('pings_open', 'disable_comments_status', 20, 2);
function disable_comments_status() {
    return false;
}

This code will remove comment support for all post types and close comments on the front end.

Conclusion

Whether you’re trying to prevent spam, simplify the look of your site, or have other reasons to disable comments, WordPress offers multiple paths to achieve this. The method you choose will largely depend on your specific needs and comfort level. Always remember to backup your site before making any significant changes, especially when editing code directly.