How to Disable WordPress Comments and Why We Chose To
Gone are the days when every single website has a comments section. Nearly every major and minor news website has done away with comments entirely, and even many WordPress blogs have shifted away from comments sections. Smaller websites that thrived on the interactions have either restricted comments or removed the function outright. Long before detailed tracking software and analytics services were available, a bustling comment section was a great way to see and engage with your readers or customers, but now it’s often omitted from website design.
With WordPress becoming a larger platform that is used to create a wide variety of websites, including this one, rather than dedicated blogs where comments are welcomed – the comments section is certainly not going to be for everyone. It can even be viewed as unprofessional, depending on the website you’re going for.
In a lot of cases today, the need for comments just is not there. If you’re a website such as ours, where this blog is purely to provide information in addition to our core business, there is not much of a need for a comments section. That comes down to the fact that we have dedicated support staff that can handle issues related to the product when filed through the ticket system. Having to monitor and track comments that may not be from customers is something that can be burdensome on many businesses. Preventing spam and the potential for trolls to leave potentially brand destroying hate speech is another reason we’ve opted to exclude commentary. Our website is also faster as a result.
This isn’t to say that comments sections are bad or outdated. A wide variety of websites may still want the extra engagement and benefit from it. Useful information can often be found in comments left by people with experience in the subject, and that adds value to whatever it is you’re writing about.
However, we’re here today to primarily discuss disabling and removing the comments section, so let’s get to that.
Using WordPress to Disable Comments
WordPress gives you two powerful solutions to remove comments from your website. The first option is to remove comments from an individual page/post. This allows you to have commentary where and when you want it, rather than an outright ban on commentary. Pages have comments turned off by default unless you turned them on, but blog posts have them enabled. To disable them, open the editor for the page or post you wish to disable them, and in the right-hand sidebar you’ll see a “Discussion” tab. Clicking that reveals the menu below.
Deselect the box that says, “Allow Comments” and you’re all set on that specific post/page.
The second option built into WordPress is the option to disable all comments outright. To do this you’ll need to be in your control panel, click on settings and navigate to Discussion. Once there, you’ll need to make sure the box highlighted below is unchecked. This area is also where you’ll find all the options to filter, restrict or otherwise alter comments within WordPress itself.
Using a Third Party Plugin
Truthfully, we recommend you avoid this option if possible. Plugins that you’re relying on to keep core WordPress functions from appearing have a habit of breaking when you update WordPress or other plugins/code gets updated.
If you’re really in need of a third-party solution, then Disable Comments does it well and is well reviewed. If you already have comments on your site then you’ll need to delete all of them otherwise they may still appear even if you choose to hide them all with this plugin.
Using Custom Coding To Remove Comments
This method can be risky if you don’t know HTML pretty well. The risk is that you’ll break your site or induce a variety of other headaches that will require you to remove your code or tweak it until you get it right. If you know what you’re doing though, you can have more control over your comments section than with the above methods.
However, for simply eliminating comments you can add simple code to your files for pages and posts. When you’re playing around with code, it is always a good idea to be doing this on a mirror of your site rather than the live version. If you break something, you don’t want to ruin the look that your customers may see in the time before you can get it sorted.
To remove comments from all of your sites pages and to prevent new ones you need to open up your page.php file and find this piece of code:
<?php comments_template( '', true ); ?>
Once you’ve located that, you’ll want to replace it with this line of code:
<!-- Begin Comment <?php comments_template( '', true ); ?> End Comment -->
To remove comments from all of your posts you’ll have to track down your single.php file and find this line of code:
<?php comments_template(); ?>
And then you’ll want to replace it with this:
<!-- Begin Comment <?php comments_template(); ?> End Comment -->
If you notice comments still appearing on other post types, you’ll need to use this code for those as well. Always take note of where you put custom code, as you’ll need to re-insert it with each update of WordPress itself (if you choose to update).
So should you shut off and remove all comments from WordPress?
Again, we chose not to include comments because we’re a business with a core product that has a dedicated support system. Any gap left by not having comments enabled is filled by reviews, direct customer feedback and our ticket system. However, if you’re putting together a website for a bakery with dozens of products rather than static pages then it might benefit you and others to have comments enabled because you benefit from the discussion and traffic driven from those comments.
Just because comments were not for us does not mean that you shouldn’t give them a second thought. Depending on your business, it can still be a great way to learn from your customers and potential customers.
RELATED LINKS
It’s the sales page where the magic happens. This is the page that gives you a return on your marketing investment. It is on this page where we convert visitors to paying customers. Do you know the valuable elements of a high-converting sales page? You will soon. Keep Learning >
Content marketing is the backbone of the biggest success stories over the last decade. I’m referring to companies like Zomato, Canva, ThinkGeek, HootSuite and even Blendtec. It’s not surprising that so many brands are focusing on content marketing, given the average ROI is twice any other type of digital marketing. Keep Learning >