• Resolved crowd

    (@crowd)


    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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>' ); ?>

    http://codex.wordpress.org/Function_Reference/comments_popup_link

    Thread Starter crowd

    (@crowd)

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

    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?

    thanks,
    Aj

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