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.

Leave a comment

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

Comment moderation is enabled. Your comment may take some time to appear.