Support » Fixing WordPress » Remove comment function from a page

  • 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

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    (@esmi)

    Forum Moderator

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

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

    Thanks again.

    esmi

    (@esmi)

    Forum Moderator

    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.

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

    Thanks

    esmi

    (@esmi)

    Forum Moderator

    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?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove comment function from a page’ is closed to new replies.