WordPress.org

Ready to get started?Download WordPress

Forums

Removing Comments box from pages (4 posts)

  1. mphillips
    Member
    Posted 3 years ago #

    I've been searching for info on how to remove the comments box on a static page. (Nothing I've found is up to date or relevant)
    I am using the Simply Works Core theme. I would like to keep a comments box on the blog page only.
    Note - I know how to disable comments in the discussion settings. What I want to do is make the comments box completely disappear.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    You would need to edit your theme's page.php template file (and any custom page templates) and remove <?php comments_template( '', true ); ?>.

  3. mphillips
    Member
    Posted 3 years ago #

    Thanks for your help. That clears the box from all pages. Now I have to see if I can isolate that line for the blog page to keep the comments there.
    Also, on the pages where I delete the comments template I'd like to remove the "Add Comment" line at the top of the page.

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    If you removed that line only from page.php, the blog pages & single posts won't be affected.

Topic Closed

This topic has been closed to new replies.

About this Topic