Forums

[resolved] How do i remove the "0 comments" thing on the main page. (4 posts)

  1. TheGerm
    Member
    Posted 3 years ago #

    Hi,

    I use excerpts for my blog and think it would be much cleaner if i removed the "O comments" link underneath each excerpt.

    Could anyone enlighten me on how to do this.

    Thanks in advance.

  2. David Borrink
    Member
    Posted 3 years ago #

    Sure "Germ". In your "index.php" file there will be a line of code (if you're working off the default theme, that is...) where you'll find these commands:

    <p class="postmetadata"><?php the_tags('Tags: ', ', ', ''); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    It's for the line which appears at the bottom of the post and has the "posted in [tags]", "Edit this" (when logged in), and "[x] comments".

    This part needs to be removed:

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    It controls what is displayed based on whether you have no comments, 1 comment, or 2 or more comments.

    Take that line out and you're all set.

  3. TheGerm
    Member
    Posted 3 years ago #

    That did the job. thanks for that David.

  4. David Borrink
    Member
    Posted 3 years ago #

    Glad to help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.