WordPress: Disable Comments From Pages Permanently

You can easily disable comments from any post or page by un-checking “allow comments” option while posting but the drawback to this is that this places “Comments are closed” message at the end of that certain post/page. While it’s great to have comments on your posts, it’s really weird to have comments on your pages like contact us, archives etc. The best solution here is to simply remove comments on pages from your theme. By doing that you will not see “Comments are closed” message either.

To remove comments from pages permanently:

  • From your wordpress admin panel, go to “Editor” under the category of “Appearance”.
  • Edit “Page Template (page.php)”
  • Look around for

    <div id=”comments”><?php comments_template(); ?></div>

  • Replace that with

    <div id=”comments”><?php //comments_template(); ?></div>

  • Update/save the file.

If you like this post, you may also like to join our RSS, or Buy Me a Beer.

This entry was posted in How to and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>