• I am having a few issues with displaying the comments link on my site.

    I am using my own child theme (with the TwentyFourteen theme), the code is directly copied from there.

    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'themename' ), __( '1 Comment', 'themename' ), __( '% Comments', 'themename' ) ); ?></span>
    (obviously I have changed the themename part to my own theme’s name)

    When I have no comments, I would like it to say “leave a comment” instead it is saying “0 Comments” How do I fix this.

    Secondly, I don’t want the comments_link to show up on the single post page.

    I figure I need to create some sort of if single loop, but I don’t know the correct code to add to the is single part.

    <?php
            if (is_single()) :
    
    else :
    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'themename' ), __( '1 Comment', 'themename' ), __( '% Comments', 'themename' ) ); ?></span>
            endif;
            ?>
  • The topic ‘Comments_link not displaying the correct wording’ is closed to new replies.