WordPress.org

Ready to get started?Download WordPress

Forums

Remove comment function from a page (6 posts)

  1. bbrownatl
    Member
    Posted 4 years ago #

    I set up a new page on my blog just to provide some background information on my topic. (See http://www.s-corptaxes.com). However, the function showing comments is present and I don't see how to turn this off for this page only.

    Now, for the regular blog, I do want the comment functionality but any insight into how I can turn off the comment function for one page.

    As always, thanks for the assistance.

    Brian

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Admin/Pages/Edit. Uncheck "Allow comments on this post" under the Discussion tab on Edit Page.

  3. bbrownatl
    Member
    Posted 4 years ago #

    That worked. Now, one more question, how do you remove the text "Comments are closed" from the page?

    Thanks again.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Edit the template file and look for <?php comments_popup_link([ some code ]);?>. Immediately before, try adding <?php if('open' == $post->comment_status) : ?>, then add <?php endif;?> immediately after.

  5. bbrownatl
    Member
    Posted 4 years ago #

    On which template page? I looked at comments.php and also page.php and did not see the code: <?php comments_popup_link.....

    Thanks

  6. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    On which template page?

    Sorry - you'd need to create a custom template for this page by copying page.php and then following the instructions on http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates.

    When you've done that, can you drop a copy of the new custom template file into the WordPress pastebin?

Topic Closed

This topic has been closed to new replies.

About this Topic