• I’ve thoroughly searched the forums for an answer to this and no topic has been resolved. How do I remove comments e.g. comments (6). I’m using a template and have removed this code:

    <?php comments_popup_link(‘Comments (0)’, ‘Comments (1)’, ‘Comments (%)’); ?>

    from the files it’s in, and it’s still showing comments.

    Or do I have to edit this code in comments.php:

    <?php else : // this is displayed if there are no comments so far ?>

    <?php if (‘open’ == $post->comment_status) : ?>
    <!– If comments are open, but there are no comments. –>

    <?php else : // comments are closed ?>
    <!– If comments are closed. –>
    <!– <p class=”nocomments”>Comments are closed.</p> –>

    <?php endif; ?>
    <?php endif; ?>

    I have also turned off comments in WP dashboard.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If I remember correctly, you need to edit the widget blocks that you’re using that are showing the number of comments. admin/presentation/widgets and click on (for instance) the top right icon on the Categories widget to edit that widget. You shoudl see it in there.

    if you have removed this:

    <?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?>

    and you are still seeing the comments(6) stuff you havent removed it from the theme files for the theme you are using. Its just that simple.

    There are quite a few recently resolved threads asking this very question. I even answered them, and they did, in fact, come back and say it worked.

    The rest of what you pasted should only be on comments.php and is what displays comment content e.g. the author, the comment, the commenter url (if any) ..etc.

    Thread Starter embarko

    (@embarko)

    Got it to work, cheers.

    I’d missed a file that had the code in it. I just commented it out in all of them.

    Thanks again for the quick response.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing comments’ is closed to new replies.