Support » Fixing WordPress » How to change wording of "Leave a Reply"

  • Resolved skyeandstone

    (@skyeandstone)


    I would like to change “Leave a Reply” to “Leave a Condolence” on the funeral home blog. I’ve been aimlessly searching files with no luck.

    Using wp theme Twenty Ten wrapped in a Rapidweaver theme.

    [moderated url]

    Thanks

Viewing 15 replies - 16 through 30 (of 38 total)
  • In WordPress 3.0, it looks to me like the “Leave a Reply” text is generated in line 1171 of comment-template.php, which is in the wp-includes directory. That text seems to be inserted into the h2 tag in line 1527 of the same file.

    In the twentyten theme, all that seems to be called by the comment_form() function in line 77 of the comments.php in the themes directory.

    Hope that helps.

    I’ve looked in all of the above in twentyten for “says:” where else would I look?

    I want to remove that word from behind the comment title in this post.

    http://valuesboard.com/?p=112

    Doing a search for “says:” I get results in functions.php and comment-template.php if that helps?

    functions, that was it, thanks simon!

    Lost the says, now I can’t find the “leave a comment” under the post near edit when logged in, where the heck is that?

    I’v searched for an hour or so….any thoughts?

    I’ve been all day resolving this myself. Had to learn some stuff along the way.

    You see, I wanted to add some text after the “Leave a Reply” to warn those commenting to use a name and not their website name and be sure to leave a comment that was relevant to the conversation, or their comment would automatically be deleted.

    So I, like most people thought they could just add some php code in their dashboard editor. Problem is, there are no editor templates with those words, “Leave a Reply”.

    I purchased the theme from WooThemes. So I headed over to their forum. After about 6 hours of struggling to understand what was being said, someone finally gave me the tip I needed.

    I learned I could not do it in my dashboard editor. You must edit the comments.php file from your server. I used FileZilla, plucked the file, edited it in a text editor and added my text as shown.

      <h2><?php comment_form_title( __(‘Leave a Reply’,woothemes), __(‘Leave a Reply to %s’,woothemes) ); ?></h2> my text.

    Then save this as file named comments.php and re-upload to your server, again using FileZilla.

    I hope this helps and this post is not too long for the moderators.

    Jerry

    Editing line 1515 within comment-template.php did work. I’m not sure why it didn’t work after the update but it’s fine now.

    Thanks for all of the support, you guys are great!

    @skyeandstone

    don’t edit the this file. Change your theme’s comment.php file.

    <?php comment_form(array(‘title_reply’ => “REPLY”))?>

    wordpress 3.0 .. bottom line of your comment.php file .. you can override a number of presets that appear on the comments form .. for example:

    <?php comment_form(array(‘title_reply’ => “Please leave a comment”, ‘comment_notes_after’ => “”)); ?>

    ‘title_reply’ => “Please leave a comment”
    changes ‘Leave a Reply’ to ‘Please leave a comment’

    ‘comment_notes_after’ => “”
    removes the html hints that appear below the comment form

    for all function references see
    http://codex.wordpress.org/Function_Reference/comment_form

    I’m using 2010 Weaver and in the /wp-includes/comment-template.php lines 1542-1545 you will find
    1542 ‘title_reply’ => __( ‘Leave a Reply’ ),
    1543 ‘title_reply_to’ => __( ‘Leave a Reply to %s’ ),
    1544 ‘cancel_reply_link’ => __( ‘Cancel reply’ ),
    1545 ‘label_submit’ => __( ‘Post Comment’ ),

    I changed ‘leave a reply’ to please levae a comment’ and all works fine.
    Sooo easy. my new line is:
    new 1542 ‘title_reply’ => __( ‘Please Leave a Comment’ ),

    It took a little searching to find the right php, but less than 1 hour.

    Michael

    (@alchymyth)


    Forum Moderator


    @hiskingdomprophecy
    and with the next upgrade of wordpress, it is gone again.
    Sooo easy.

    use the method suggested by @shaaarwing, this will stay with the theme, even after wordpress upgrades.

    I wish we could get @shaaarwing and @hiskingdomprophecy comments made ‘sticky’ at the top or otherwise highlighted.

    @hiskingdomprophecy dug up the details, and @shaaarwing said how to do it correctly

    I’ve looked in all of the above in twentyten for “says:” where else resume writers would I look?

    I want to remove that word from behind the comment title in this post.

    drumelt

    (@drumelt)


    The best way to change the wording “Leave a reply” is to use the filter.
    To make it say “Submit a comment:”, place this code in your functions.php file:


    function comment_reform ($arg) {
    $arg['title_reply'] = __('Submit a comment:');
    return $arg;
    }
    add_filter('comment_form_defaults','comment_reform');

    None of these tricks works for me >_<;
    No change of text at all.

Viewing 15 replies - 16 through 30 (of 38 total)
  • The topic ‘How to change wording of "Leave a Reply"’ is closed to new replies.