WordPress.org

Support

Support » How-To and Troubleshooting » “Leave a Comment” link won’t disappear

“Leave a Comment” link won’t disappear

  • I have disabled the Comment feature on my block, yet there is still a clickable “leave a comment” link. When clicked, it brings you to another post. This is frustrating because visitors might think the site is just buggy. It should read: comments closed.

    here is my blog

Viewing 9 replies - 1 through 9 (of 9 total)
  • I meant to write “blog”.

    I’ve read several related topis in the forums, but none of them explain why once comments is disabled, the wording of the link doesn’t change to: “comments closed”.

    Under Settings > Discussion
    Uncheck “Allow people to post comments on new articles”

    This only affects new posts. Since you already have posts you will need to go back and turn off their comments individually.

    Hi Dralezero: I did all of that from day one. I think it is perhaps a bug. I am using an In-Development theme (Twenty Ten) within a Beta WordPress install, so it is sort of a double whammy. I’ve reported the issue as a bug, and am awaiting a reply.

    Ok. I’m not surprised of weird behavior of the comments, especially in beta. I’ve seen before on my WordPress (not beta) that I would change all my posts to open then they would go closed a few days later. It was happening to someone else on my hosting account too. I figure it was probably my host. It was weird.

    Moderator James Huff

    @macmanx

    Support Team Rep.

    If you don’t want any sort of comment link to be displayed, remove the following line from your theme’s loop.php file:

    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>

    I removed that line from the loop.php file and still have had no luck with the comments being removed as well.

    Hi. I am using WP 3.0.1 + Twenty Ten 1.1
    I removed the code shown above (from James MacManX) from loop.pho in order to remove all comments/comment fields from my site – no go.
    All of the boxes are empty in Discussion Settings.
    Would really like to remove all trace of comments from this site …
    Thanks for your help.

    Moderator Michael

    @alchymyth

    Forum Moderator

    to remove all comments/comment fields

    the code you removed, only shows the number of comments with a link to the comments and forms.

    to remove the comments and comment forms, you would need to search the template files for:

    <?php comments_template( '', true ); ?>

    and remove that code.
    (at least in loop.php, single.php, and page.php)

    This worked like a charm, thank you. Also found/removed that code in onecolumn-page.php. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘“Leave a Comment” link won’t disappear’ is closed to new replies.