Getting too many annoying email notifications or comments from your wordpress website? Well, there is a way to stop it for good. If your website does not need a comment module. You can easily remove the comments form and restrict your website from sending you annoying spam comment notifications. You will explore all the steps to remove or disable comments on a WordPress website.
Table of Contents
In this blog, we’re going to discuss steps to remove or disable comments on a WordPress website, reasons people remove or disable comments, difference between removal or disable comments on a WordPress website.
Also read: How to Secure Your WordPress Website from Hackers?
Steps to remove comments from WordPress Website
Here are the simple steps that can be used to remove comments from WordPress website:
Step 1
Go to your Website’s active theme folder or directory
Step 2
Backup the comments.php file
Step 3
Now, create a new empty comments.php file
Following step 1 to 3, you can stop receiving comments or any kind of comment notifications on your WordPress website.
Below step can be useful in cases where you would like to keep the comments feature on your wordpress website but would not like to receive comments on your attachment urls.
Related: Top 10 SEO Plugins for WordPress Website
Steps to Disable Comments on a WordPress Website
Edit your themes function.php file and add the below piece of code at the very bottom.
function smart_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', 'smart_filter_media_comment_status', 10 , 2 );
Save the file and you’re done.
Related: How to Implement Infinite Pagination in WordPress
Why Do People Remove or Disable Comments on a WordPress Website?
There are several reasons why a website administrator may choose to remove or disable comments on a WordPress website:
1. Spam comments
Comments can be a source of spam, which can be time-consuming to moderate and remove. Disabling comments can reduce the amount of spam on a website.
2. Lack of engagement
If a website does not receive many comments or the comments do not add value to the website, it may not be worth the time and effort to moderate them.
3. Maintenance
Moderating comments can take up a lot of time and resources. Removing or disabling comments can free up time for other website maintenance tasks.
4. Liability
Comments can sometimes contain offensive or inappropriate content. As the website owner, you can be held liable for any content on your website, including comments. Removing or disabling comments can reduce the risk of liability.
5. Privacy
If you are running a website that collect personal information of the visitors, disabling comments is a good idea.
6. Better Engagement
Some website administrator prefer to use other engagement tools like social media, email or live chat to interact with their visitors.
Difference Between Removal or Disable Comments on a WordPress Website
The difference between removing and disabling comments on a WordPress website is related to the visibility and availability of the comments.
1. Removing comments
This means that the comments are deleted permanently from the website. They will no longer be visible or accessible to anyone, including the website administrator. This can be useful if there are a lot of spam comments or comments with inappropriate content that need to be removed completely.
2. Disabling comments
This means that the comments are still present on the website, but they are not visible to visitors. They are also not available for new comments to be added. Website administrators can still access and moderate the comments if needed. This can be useful if you want to temporarily turn off comments or if you want to disable comments on specific posts or pages.
3. Closing comments
Closing comments is a way to stop new comments from being added on a post but the already existing comments are still visible. This can be useful when a post is no longer relevant for comments or if a post has reached a certain number of comments and you don’t want to add more comments.
You can go with both options, disabling and removing comments, either by editing the post/page settings, using a plugin or by editing the code.
Related: How to start with a custom wordpress theme?
Conclusion
In conclusion, removing or disabling comments on a WordPress website can be a useful tool for website administrators to improve the user experience, protect privacy and avoid liability. Spam comments and inappropriate content can be a burden, and removing or disabling comments can help to reduce the amount of time and effort spent on moderating them.
Additionally, the website administrator may prefer to use other engagement tools like social media, email or live chat to interact with their visitors. However, it is important to note that comments can also be a valuable source of engagement and feedback for a website. Therefore, website administrators should carefully consider their options and make the decision that best fits their website’s goals and needs.