Site icon WP Sauce

How to Disable Comments on WordPress: A Step-by-Step Guide

WordPress comments

If you’re running a WordPress website or blog, you may have noticed that comments can sometimes be a hassle. Whether it’s dealing with spam, moderating inappropriate comments, or simply not wanting to engage with readers in that way, there are many reasons why you might want to disable comments altogether. Fortunately, it’s a fairly simple process to turn off comments on WordPress.

Comments are an integral part of WordPress, allowing readers to engage with authors and each other, and providing valuable feedback and discussion. However, not every website or blog needs comments, and there are many reasons why you might want to disable them.

In this article, we’ll walk you through the process of disabling comments on WordPress, whether you want to do it site-wide or on individual posts or pages. We’ll also show you how to remove existing comments, hide them from visitors, and disable pingbacks and trackbacks.

Why Disable Comments on WordPress?

There are many reasons why you might want to disable comments on your WordPress site. Some common reasons include:

How to Disable Comments Site-Wide

If you want to disable comments on your entire site, there are two methods you can use: via the WordPress Discussion Settings or via a plugin.

Via WordPress Discussion Settings

To disable comments site-wide via WordPress Discussion Settings, follow these steps:

  1. Log in to your WordPress dashboard.
  2. Click on “Settings” in the left-hand menu, then “Discussion.”
  3. Under “Default article settings,” uncheck the box next to “Allow people to submit comments on new posts.”
  4. Under “Other comment settings,” uncheck the boxes next to “Comment author must fill out name and email” and “Users must be registered and logged in to comment.”
  5. Click “Save Changes.”

Via Plugin: Disable Comments

If you prefer to use a plugin to disable comments, follow these steps:

  1. Log in to your WordPress dashboard.
  2. Click on “Plugins” in the left-hand menu, then “Add New.”
  3. In the search bar, type “Disable Comments” and hit enter.
  4. Find the “Disable Comments” plugin by Samir Shah and click “Install Now.”
  5. Once the plugin is installed, click “Activate.”
  6. Go to “Settings” in the left-hand menu, then “Disable Comments.”
  7. Check the box next to “Everywhere” to disable comments site-wide.
  8. Click “Save Changes.”

How to Disable Comments on Individual Posts or Pages

If you only want to disable comments on certain posts or pages, you can do so via the WordPress editor. Here’s how:

  1. Log in to your WordPress dashboard.
  2. Click on “Posts” or “Pages” in the left-hand menu, depending on which type of content you want to edit.
  3. Find the post or page you want to disable comments on and click “Edit.”
  4. Click on “Screen Options” in the top right-hand corner of the screen.
  5. Under “Show on screen,” make sure the box next to “Discussion” is checked.
  6. Scroll down to the “Discussion” section and uncheck the box next to “Allow comments.”
  7. Click “Update” to save your changes.

How to Remove Existing Comments from WordPress

If you’ve already received comments on your WordPress site and want to remove them, you can do so via the Comments section in your dashboard. Here’s how:

  1. Log in to your WordPress dashboard.
  2. Click on “Comments” in the left-hand menu.
  3. Check the box next to each comment you want to remove.
  4. From the “Bulk Actions” dropdown menu, select “Move to Trash.”
  5. Click “Apply.”

How to Hide Existing Comments from Visitors

If you want to keep your existing comments but hide them from visitors, you can do so via the WordPress editor. Here’s how:

  1. Log in to your WordPress dashboard.
  2. Click on “Posts” or “Pages” in the left-hand menu, depending on which type of content you want to edit.
  3. Find the post or page with comments you want to hide and click “Edit.”
  4. Click on “Screen Options” in the top right-hand corner of the screen.
  5. Under “Show on screen,” make sure the box next to “Discussion” is checked.
  6. Scroll down to the “Discussion” section and uncheck the boxes next to “Allow comments” and “Allow trackbacks and pingbacks on this page.”
  7. Click “Update” to save your changes.

How to Disable Pingbacks and Trackbacks

Pingbacks and trackbacks are a type of comment that notifies you when another site links to your content. If you want to disable them, you can do so via the WordPress Discussion Settings. Here’s how:

  1. Log in to your WordPress dashboard.
  2. Click on “Settings” in the left-hand menu, then “Discussion.”
  3. Under “Default article settings,” uncheck the box next to “Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.”
  4. Click “Save Changes.”

How to Remove Comment Form from WordPress

If you want to remove the comment form from your WordPress site altogether, you can do so via the WordPress editor. Here’s how:

  1. Log in to your WordPress dashboard.
  2. Click on “Appearance” in the left-hand menu, then “Theme Editor.”
  3. Under “Templates,” click on “Comments (comments.php).”
  4. Select all the code in the file and delete it.
  5. Click “Update File” to save your changes.

Note that this will remove the comment form from your entire site, so use with caution.

How to Disable Comments in WordPress Theme Files

If you want to disable comments via your theme’s files, you can do so by editing the appropriate files. Here’s

  1. Log in to your WordPress dashboard.
  2. Click on “Appearance” in the left-hand menu, then “Theme Editor.”
  3. Find the file that corresponds to the page or post where you want to disable comments (e.g. if you want to disable comments on single blog post pages, find the “single.php” file).
  4. Add the following code to the file, just above the “comments_template();” line:

<?php
if ( comments_open() ) {
comments_template();
}
?>

  1. Click “Update File” to save your changes.

This code checks whether comments are open for the current post or page, and if they are, it displays the comment form using the “comments_template();” function. By wrapping this function in an if statement, we can prevent the comment form from being displayed if comments are disabled.

Conclusion

Disabling comments on your WordPress site can help reduce spam, improve site performance, and streamline moderation efforts. Whether you want to disable comments site-wide or on individual posts or pages, there are several methods you can use to achieve this.

Remember to always test your changes after disabling comments to make sure your site functions as intended. And if you ever change your mind and want to enable comments again, simply follow these same steps in reverse.

 

Exit mobile version