[resolved] Leave a comment (4 posts)

  1. crowd
    Posted 4 years ago #

    In the twenty-eleven theme, comments_popup_link only shows a "Leave a comment" link in case no comments have been left yet:

    <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?>

    As soon as a comment is left, no "Leave a comment" shows, just a number of left comments instead.

    What I need is a "Leave a comment" link always show in the bottom of the post, independently on the number of the comments left. I just need a separate link that will always read "Leave a comment".

    Any ideas please?

  2. Michael
    Forum Moderator
    Posted 4 years ago #

    do not edit Twenty Eleven directly - start by creating a child theme of Twenty Eleven to work with - http://codex.wordpress.org/Child_Themes

    in content.php in the child theme, as one possibility - re-write the posted code to:

    <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentyeleven' ) . '</span>', '<b>1</b> Reply <span class="sep"> | </span><span class="leave-reply">' . __( 'Leave a comment', 'twentyeleven' ) . '</span>', '<b>%</b> Replies <span class="sep"> | </span><span class="leave-reply">' . __( 'Leave a comment', 'twentyeleven' ) . '</span>' ); ?>


  3. crowd
    Posted 4 years ago #

    Thank you, alchymyth, smart solution. Works like a charm!

  4. ajubdeen
    Posted 3 years ago #

    Hi Guys,

    I have a problem in a related area and you might be able to help me out.

    Issue: I use the twenty Eleven theme and my comments bubble(link) is broken. I don't want to change it, I don't mind the bubble, I have to get the target url to work. I used Firebug and the underlying url resolves to something like:

    http://<mysite>/blog/http:/<my site>/photos/page/gallery/#respond.

    Clearly, the section after "blog/" and before "#respond" is wrong. Something related to the post should be showing up here. Any idea how I can fix this?


Topic Closed

This topic has been closed to new replies.

About this Topic