Turn Off Comments in Wordpress

Post by 
John Crenshaw
Published 
October 16, 2014

A while back I wanted to do something with Wordpress that seemed like it should be the easiest thing in the world to do, like there should be a setting or something to change to turn off comments, but my search ended in disappointment at the thought that I would have to scrounge through and remove all the code that displays comments...I really hate when things aren't made easy for me.

Anyway, here's how it's done...

1. Open index.php and remove this:

1
<span class="add_comment"><?php comments_popup_link('? No Comments', '? 1 Comment', '? % Comments'); ?></span>

2. Open single.php and remove this:

1
<?php comments_template(); ?>

3. Open archive.php and remove this:

1
<?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>

That's it, you're done, unless you have another theme that you're using, in which case you need to scan all your blog pages for anything related to comments. If you find something, open whatever template that page is using and remove any lines of code like what's above.

Never miss
an update

We never share your info. View our Privacy Policy
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
FOLLOW US ON SOCIAL
THere's More

Post you might also like

All Posts
SEO
Jun
3
//
2020

How Long Does SEO Take?

Scroll all the way down for the calculator. We've seen rankings jump to #1 in 3 days. We've also seen it take 2 or more years. So what should you expect?
SEO
Jun
2
//
2020

What's the Difference Between SEO & SEM?

Don't use the terms SEO and SEM. In this article we'll show you better terms to use for more clarity.
Content
Jun
1
//
2020

Your Content is a Product

SEO
May
8
//
2020

How ADT could drive 10x more traffic to their crime maps

SEO
May
7
//
2020

All the SEO Training Courses We Could Find

Subscribe to Our  Channel