WordPress.org

Ready to get started?Download WordPress

Forums

How to hide add comment link on pages (4 posts)

  1. waggie112
    Member
    Posted 3 years ago #

    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.

    http://wundersprache.com/

    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?

    Thanks,
    Joseph Wagner

  2. 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(); ?>

  3. waggie112
    Member
    Posted 3 years ago #

    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?

  4. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic