Why do you need to disable comments in WordPress sometimes?
As you know, the comment of readers is a simple way that helps increase interaction between readers and website owners. Thanks to it, you are able to improve your site content to be better in the future. However, in some cases, you need to disable comments in WordPress. For example, you want to post announcements or give some information simply. Such posts are not required to allow comments.
Besides that, normally, we often allow comments for blog posts or articles, because there are many issues that readers want to exchange and discuss. However, for static pages such as contact, services, about us, etc., it is unreasonable to allow comments.
Another common reason many website owners want to disable comments in WordPress is to prevent spam. This will help you manage your website and keep the content on it from being diluted by spam.
In the blog today, we would like to bring you some methods to manually disable comments on a part of the website, such as some posts or pages. So, let’s get started now!
Instructions to disable comments in WordPress
Turn off comment feature on Future Posts
In order to stop comments on your future posts, you just need to go to Settings -> Discussion. In the Default post settings, let’s uncheck the option ‘Allow people to submit comments on new posts‘. Moreover, there are more comment settings under the option, which you can see in the following image. So, you are easily set up some features for the comment on your site.
Don’t forget to click the Save changes button to ensure that your settings have already been changed.
Disable comments on Posts or Pages with Bulk
If you are looking for an easy way to disable comments on all posts or pages, we will guide you to do it with Bulk.
The first step you need to do is go to Posts -> All Posts. After that, let’s click on the box before the word Title to select all posts. Then, at the Bulk Actions box, simply choose Edit and press the Apply button.
Now, a bulk edit will appear for you to change your setting. In the comments section, let’s choose the Do not allow option to disable comments on all posts. Don’t forget to store your changes by pressing on Update button.
You are able to follow the same steps to disable comments on all your pages.
You just need to access Pages -> All Pages, then select all pages, change Bulk actions into Edit and apply it. In the next step, let’s choose the Do not allow option for Comments and update it.
Disable WordPress comments on media
Actually, there are two methods for you to do that. You are able to manually disable comments on each media attachment file. However, this method is quite time-consuming. So, we would like to recommend you to follow the way that turns off the comment feature on all media. You just need to add the code below in the site-specific plugin or theme’s functions.php file:
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 );
Use a plugin to turn off commenting
Currently, on the market, there are many plugins that help you turn off the comment feature on the posts, pages, or media you want. In this article, we decided to guide you to do just that with Disable Comments – one of the most effective WordPress Comment Plugins.
First of all, you need to install this plugin. Now, on the admin dashboard, let’s choose Plugins -> Add New. After that, on the search bar, simply type the name of the plugin you are looking for. Finally, click on Install Now -> Activate the plugin you need.
After finishing activating the plugin, go to Settings -> Disable Comments.
If you want to turn off commenting on all kinds of posts and pages of your site, the Everywhere option is suitable for you. Furthermore, you can disable comments on anything you want, including Posts, Pages, and Media in the On Specific Post Types section.
The last step is storing all your settings with Save changes button.
Delete WordPress Comments
Although the above methods will help you disable comments on posts, pages, or media, it does not mean that previously posted comments will be deleted. In case you want to delete existing comments on your website, let’s follow these simple steps.
Firstly, let’s open the Comments section. Now, select all comments and choose the Move to Trash option in Bulk actions. Then, just apply it.
If your site contains a lot of comments, you must repeat this work page by page. That means this way only allows you to delete 20 comments. So if you want to delete all comments on the next page, you have to do this again.
Remove the ‘Comments Are Closed’ status
After using the methods to disable comments, if the comment form still exists on your website or says “Comments are closed”, let’s ask the theme developer to fix the problem. On the other hand, you can also handle this problem yourself.
Now, let’s access FTP Client or File Manager in the WordPress hosting control panel. Next, you have to find the theme folder that is in the /wp-content/themes/folder. After that, all you need to do is look for the comments.php folder and change its current name into comments_old.php.
Then, let’s generate a new file by right-clicking and choosing to Create new file option. This new file will be named comments.php. Now, there will be an empty comments template for your theme.
Closing thoughts
In conclusion, we have already introduced to you some useful methods to disable comments in WordPress with detailed information. Therefore, we hope that the blog may be helpful for you. If you want to ask us any question, don’t hesitate to leave your comment below. Last but not least, don’t miss a good chance to get many responsive and professional Free WordPress Themes for your site here.
The post How to disable comments in WordPress appeared first on LTHEME.
0 Commentaires