Turning off comments globally in WordPress is kind of a community frustration among developers, we get requests from time to time from our clients that are running WordPress that are wanting to globally disable comments.
Honestly there really isn’t a good way to approach this, in a nutshell, this has to be handled on a post by post basis also page by page if you are running comments on your pages as well.
In the back of my mind I knew in theory what had to happen to globally remove the comments.php include from showing up on the site but wordpresshacker.com did a great job posting the 3 steps involved that I decided to re-post them here…
- Open up index.php and remove this line of code:
<span class=”add_comment”><?php comments_popup_link(‘? No Comments’, ‘? 1 Comment’, ‘? % Comments’); ?></span> - Open up single.php and remove this line of code:
<?php comments_template(); ?> - Open up archive.php and remove this line of code:
<?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.
Turn Off WordPress Comments | WordPress Hacker
Questions or Comments?