WordPress – Disable Post Comments by Keyword, Author, Category, or Tag

If you have an online news site or if you give your opinions on controversial topics, it’s likely that you’ve received lots of negative comments. In that case, it could be great for your mind/heart’s health to disable post comments in WordPress.

Also, if you have thousands of comments in your posts, your server may become so slow that your readers and visitors won’t have a good experience with your posts load. This is another situation in which you may want to disable posts comments.

Disabling comments with WP

As we know, WordPress allows us to enable/disable comments one at a time by going to the Discussion section in each post and checking/unchecking the Allow comments checkbox.

You can also disable all post comments. But what if you want to disable them by keyword, author, category, or tag? You need to use a somewhat confusing PHP snippet.

However, in this case we want to show you how to disable comments quickly for hundreds of WP posts. You’ll do it using a spreadsheet which contains a powerful Bulk Edit tool. You can apply changes in the spreadsheet or with the tool we just mentioned.

We’re talking about the Posts, Pages, and Custom Post Types Spreadsheet plugin.

Disabling comments with the Posts, Pages, and Custom Post Types Spreadsheet plugin

You can download the plugin here:

- or - Read more about it

Once installed and activated, go to Sheet Editor > Edit Posts, and the plugin will display all your posts and their info in a spreadsheet like this.

If you want to disable comments just for some little posts individually, you need to go to the Comments column and just disable the checkbox you’ll find there.

  • Checkbox active: comments enabled
  • Checkbox inactive: comments disabled

Finally, click on Save to apply the changes. It’s that simple.

To disable post comments for hundreds of posts by keyword, author, category, or tag, you need to use the plugin’s Bulk Edit tool. It’s located on the plugin’s top toolbar, so please click on it.

a) Filter the posts you’ll edit

Once you open the Bulk Edit tool, you can filter your posts. For this you need to select the I want to search rows to update option in the Select the rows that you want to update dropdown.

It will open a Search tool that contains the necessary fields for you to filter your posts. You’ll find these fields:

  • Contains keyword – Use this field to search for all the posts containing a specific keyword.
  • Author – Enter any author’s name to search for all his/her posts.
  • Enter Categories, Tags, or Formats – Use this field to search for your posts in all those ways.
  • Run search – After entering the search terms, click on this button to filter your posts.

b) Disable comments in all filtered posts

In the Bulk Edit tool you need to use these values to disable the post comments:

  • Select the rows that you want to update: I want to search rows to update
  • What field do you want to edit: Comments
  • Select the type of edit: Set value
  • Replace existing value with this value: Disable this checkbox.
  • Click on Execute now

Done!

As you saw, it’s really simple to disable your post comments by keyword, author, category, or tag. You don’t need to use any codes, and you can save many hours.

You can download the plugin here:

- or - Read more about it

Close Menu