Support » How-To and Troubleshooting » How to hide add comment link on pages

How to hide add comment link on pages

  • Hello,

    I’m a beginner when it comes to php and I’m really confused as to how I can hide the “leave a comment” link at the top of my pages.


    I have the comments on all of the pages except for blog turned off, and I really just want to remove the leave a comment link on the pages.

    Anybody have any ideas on the simplest way to do this?

    Joseph Wagner

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Kathryn


    You’ll need to find the file that’s calling in the comments template for pages, and remove or comment it out. Check page.php in your theme files, and look for something like:

    <?php comments_template(); ?>

    Either remove it, or comment it out (hide it) by adding two slashes before it, like

    <?php //comments_template(); ?>

    Hey thanks for the response, but the problem is that when I remove the comment ability from the pages, I remove the ability to comment on the blog page also, because it’s set as a static page as blog. Then the user can’t comment from the blog page, but they have to first click on the blog entry and then leave a comment there. Any other suggestions?

    Moderator Kathryn


    I guess I’m confused about your setup, then, because normally editing page.php has no bearing at all on your blog section as it affects pages only, not posts.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to hide add comment link on pages’ is closed to new replies.