How to Disable Comments in WordPress

0
297
How to Disable Comments in WordPress

WordPress, the most popular content management platform of today, began its journey as a modest blogging platform. However, WordPress has grown a lot since its launch and now it comes with extended functionalities that allow users to host enterprise-level web applications.

As you might already be aware, blogging mainly involves posting content online and encouraging conversation in the form of comments. Hence, WordPress has a fairly robust commenting feature that continues till today. However, things have changed and many website administrators who post static content may not like to have comments on their pages. Moreover, many times, spammers with a specific objective post hundreds of comments on your pages to gain control of it. In that case, you would need to disable the comments feature to make your webpage more relevant to your objective.

Thanks to the newly updated WordPress platform, you can now disable comments on specific posts, pages, or even delete individual comments. In this post, we have discussed different ways to disable comments on the platform.

Cheap SSL

Ways to Disable Comments on WordPress

If you want to disable or delete comments on your WordPress website, the place to start is the WordPress dashboard. From the dashboard, navigate to Settings and then click on ‘Discussion’.

Thereafter, you can use one of the below-listed ways to disable or delete comments:

1. To stop comments on all future posts and pages

If you think you don’t want to receive comments for any future posts, you can do so very easily. All you have to do is uncheck the option “Allow people to post comments on articles”. This will disable comments on all future posts or pages on your website.

You will find this option under Settings -> Discussion Settings. This action will disable pages and the visitor will not be able to post any comment. Here are the detailed steps you need to follow

  • From the left sidebar of your panel, go to Settings-> Discussion.
  • Uncheck the option that says “Allow people to post comments on new articles”.
  • Click the Save Changes button to save your preferences.

However, if you want the commenting option open for certain posts or pages and disabled for the rest of the pages, you can do so by following the steps given below:

  • Go to My site -> Pages or My site -> Post and select the page or post for which you want to enable comments.
  • In the Settings sidebar, look for the Discussion tab and click on it to open.
  • Select Allow comments to enable comments for the specific post or page.

2. To stop comments on specific posts or pages(in bulk)

If you want to stop commenting on all pages and posts in bulk without going to each of them individually, you can do it easily through the following steps:

  • Go to Posts -> All Posts from the left sidebar to reveal the options.
  • From the bulk actions dropdown box, select Edit.
  • Click on Apply.

Now you can perform bulk actions on all posts and pages. The preferences you select in this section will apply to all posts on your website. You can perform a variety of bulk actions like changing the author name or turning off comments for all posts on the website.

  • From the comment dropdown box, select ‘Do not allow’.
  • Click on Update.
  • You can disable comments on all pages on your website.

The steps to disable comments are similar. All you have to do is select Pages from the WordPress dashboard and the remaining steps are similar.

3. To stop comments on existing posts individually

If you want to disable comments for specific posts, you can do so by selecting these posts individually and updating your preferences for them (disabling comments). Here are the steps that you need to follow:

  • Go to the WordPress dashboard.
  • In the left sidebar, click ‘All posts’ and then click Edit Post.
  • On the right-hand side, you will see a writing area. Look for the Discussion section at the bottom of the writing area.
  • Under Discussion, uncheck the option which says “ Allow comments”.

Another way to stop comments on existing posts individually is through the Quick Edit option.

  • Go to the WordPress dashboard.
  • Click Posts in the left-hand side navigation bar.
  • Find the post for which you want to disable comments and select it.
  • Click the Quick Edit link.
  • In the Quick Edit panel that opens on the right-hand side, look for the option Allow comments
  • Uncheck the box beside “Allow comments”
  • Click Update to save your preferences

4. To disable comments on media files

WordPress considers media (images, videos) as individual components on the page. Visitors have the option to comment on the media posted on the page. Even if you have disabled comments for a certain page, the media on the page will continue to receive comments. The reason is when you upload an image or video, an attachment file is created which is treated as an individual element.

If you don’t want any comments on a specific post or page, you need to disable comments on media files as well. Here are the steps to follow:

  • Access the WordPress dashboard.
  • Click Media on the left-hand side navigation panel.
  • When the media library opens, select the media file for which you want to disable comments.
  • Click Edit.
  • In the Edit window, you will see a similar discussion section to the one you see in the in-text editor of posts. You will find an option to disable comments in that section.
  • Unlike posts and pages, you can’t perform bulk actions on media files. If you want to disable comments on media files, you need to select them individually and perform the above steps to disable comments for each one.

Disable comments on media through code

Disabling comments is usually a time-consuming task and frustrating for many site administrators. This is why WordPress allows you to use code snippets to perform actions and change preferences. Here we have provided you with a code snippet that will disable comments for all media files on your website. All you need to do is copy and paste the following code snippet in your function.php file that is present in the WordPress installation folder:

function filter_media_comment_status( $open, $post_id )

{

$post = get_post( $post_id );

if( $post->post_type == ‘attachment’ )

{

return false;

}

return $open;

}

add_filter( ‘comments_open’, ‘filter_media_comment_status’, 10 , 2 );

How to Delete Existing Comments?

While the above steps discussed in various sections will disable comments, they won’t delete the existing comments on the website pages and posts. WordPress gives you the option to delete existing comments from your WordPress website. Here is how you can do it:

  • Access the WordPress dashboard.
  • Click Comments in the left-hand side navigation panel.
  • Select all comments.
  • Select Move to Trash from the Bulk Action drop-down menu.
  • Click Apply.

This will delete all comments on your website.

Disable Comments With a Plugin

WordPress platform is also known for its huge plugin library that allows you to extend the functionalities of your website. Users can find a plugin for almost any functionality. As such, it isn’t surprising that there are plugins to disable or delete comments on your website. The beauty of using a plugin is you don’t have to do things manually and the task is completed in a few steps without digging through menus.

You can use the ‘Disable Comments’ plugin on your WordPress website. After installing activating the plugin follow the steps given below. The plugin will remove the comment menu from your dashboard, and you will see new options to manage your comments.

  • Open admin panel/dashboard.
  • Go to Settings -> Disable comments.
  • Here you will find options like Disable comments that will disable comments for all posts and pages on your website.
  • If you want to disable comments for pages, posts, or media, you get an option to disable comments for them as well. All you have to do is place a checkmark in the adjoining box beside the menu item and Save changes.

Wrapping Up

If you’re new to the field of blogging and websites, WordPress can help you get started and get a firm-hold quite easily. It offers you flexibility when managing post creation, category addition, designing the look and feel, and performing several other actions related to your website/blog. One of the most critical things WordPress lets you control is the management of comments on your website. Disabling and deleting comments on your website is quite easy and hassle-free, thanks to WordPress’ simple-to-understand workflow.

People are also reading: 

LEAVE A REPLY

Please enter your comment!
Please enter your name here