WordPress.org

Ready to get started?Download WordPress

Forums

[closed] (Twenty Twelve) change "leave a reply" (16 posts)

  1. intheknowmom
    Member
    Posted 1 year ago #

    Can someone tell me where I can change the "leave a reply" to something else? I cannot find it in the comments.php for Twenty Twelve. I would also like to change it when it displays the number of comments to something else.

    I do have a child theme and an override of some sort would work as well!!

  2. Mathias Gomig
    Member
    Posted 1 year ago #

    Go into the single.php in your current theme and look for

    <?php comment_form(); ?>

    Change it to:

    <?php
       $defaults = array(
           'title_reply' => 'Write your random text here.',
        );
    
        comment_form($defaults);
    ?>
  3. intheknowmom
    Member
    Posted 1 year ago #

    That does not appear in the Twenty Twelve theme.

  4. Mathias Gomig
    Member
    Posted 1 year ago #

    Look for the comments.php in the Twenty Twelve folder - Go to line 58 - and there is the <?php comment_form();?>

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    In Twenty Twelve, you'll find the comment_form() call in the comments.php file, near the end of the file. You can change it to this:

    comment_form(array(
       'title_reply' => 'Leave a Reply',
       'title_reply_to' => 'Leave a Reply to %s',
    ));

    The %s will be replaced by the username you're replying to in non-Javascript situations.

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    Since you're using a child theme, copy the comments.php file to the child theme, and then make the changes there.

  7. intheknowmom
    Member
    Posted 1 year ago #

    What about changing the number of comments to something else? Instead of "11 replies" just have "replies" ... where can I find that?

  8. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    At the top of the comments.php file, you'll find this:

    <h2 class="comments-title">
    	<?php
    		printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentytwelve' ),
    			number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
    	?>
    </h2>

    That is where it prints the "One thought" or "10 thoughts" message for the comments. Change it as you like in your child copy.

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 1 year ago #

    If you're talking about the "1 reply" or "XX Replies" link at the bottom of each post, on the other hand, then that is in the content.php file, as well as all the other content-whatever.php files, for each type of Post Format.

  10. dianabyron
    Member
    Posted 1 year ago #

    Please help. I've tried every suggestion, including the ones above, for changing the text of "Leave a reply" in Twenty Twelve and none of them work. In most of the posts, the code they talk about is not even in the functions.php or the comments.php of the theme. And even when it is, making the changes people have suggested does nothing to change the "Leave a reply" text.
    How to?

  11. jasonyohon
    Member
    Posted 1 year ago #

    Line 28 of content.php

    <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' )

    Change to:

    '<?php comments_popup_link( '<span class="leave-reply">' . __( 'YOUR MESSAGE, 'twentytwelve' )'

    worked for me on WordPress 3.5.1

  12. RossB
    Member
    Posted 9 months ago #

    I've been trying to change "Leave a Reply" to "Make a comment", and despite trying several recommendations, including the one of jasonyohon's above, have not managed to do it.

    Has Twenty Twelve changed with one of the updates, perhaps (I'm running latest version, with a child theme)?

    Anyway, if anyone could indicate how to make this simple wording change to the Comments form, would be appreciated.

    Cheers
    Ross

  13. webmystery
    Member
    Posted 8 months ago #

    Samuel Wood's instructions work (Thanks, Samuel!) -- maybe he wasn't specific enough for you. When I was bit greener I was sometimes thrown off when instructions didn't include the complete php syntax.

    Change this:
    <?php comment_form(); ?>

    to this:

    <?php
    comment_form(array(
       'title_reply' => 'Your edited text goes here,
       'title_reply_to' => 'Change this text for the nested comment reply %s',
    ));
    ?>
  14. robiannpc
    Member
    Posted 8 months ago #

  15. Cafecomm
    Member
    Posted 7 months ago #

    I've tried making the above changes to my comments.php file (my site uses twenty twelve theme) and even after refreshing, I don't see a change. Please, I'd really appreciate a hand - perhaps it's as easy as waiting a few hours for the server to refresh?

    Just to be clear: I'd like to change "Leave a reply" to "Please click here to add a comment" and my website is: http://www.kimshupenia.com/

  16. esmi
    Theme Diva & Forum Moderator
    Posted 7 months ago #

    @Cafecomm: As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, this topic is 8 months old an references an older version of both WordPress & the theme.

Topic Closed

This topic has been closed to new replies.

About this Topic