WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to change wording of "Leave a Reply" (39 posts)

  1. graleh
    Member
    Posted 3 years ago #

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

  2. skyeandstone
    Member
    Posted 3 years ago #

    Changing 'leave a reply" on line 1540 works for me.

    @ drumelt, Why is it better to use a filter? What is the advantage?

  3. drumelt
    Member
    Posted 3 years ago #

    The advantage is that you have not changed the core WordPress file, so that your changes will not be erased by an update.

  4. skyeandstone
    Member
    Posted 3 years ago #

    I like that idea. Can I do that right from my Dashboard area?
    I've been modifying everything in my index file on my own server every time I update.

  5. j.gairns
    Member
    Posted 3 years ago #

    I am a total noob and it worked for me. I'm using Twenty-Ten theme.

    Look for 'title_reply' in the $defaults array section
    around line 1541 of comment-template.php in the wp-includes directory

    'title_reply' => __( 'Invite me to dinner' ),

    Works like a charm.

    Thanks for the suggestions!

    J

  6. hatwind
    Member
    Posted 3 years ago #

    http://www.nazhang.com/index.php/2011/04/

    LOOK here
    you should edit“ /wp-includes/comment-template.php”

  7. alchymyth
    Forum Moderator
    Posted 3 years ago #

    LOOK here
    you should edit“ /wp-includes/comment-template.php”

    imho - wrong.

    there are quite a few reason why you should not edit wp core files; being safe for upgrades is only one.

    for most problems, there are solutions without doing this.

    you can change those fields by editing the parameters in comment_form() which you likely find in comments.php
    http://codex.wordpress.org/Function_Reference/comment_form

  8. moviba
    Member
    Posted 3 years ago #

    alchymyth is right,

    In your comment template within your theme look for comment_form(); and between the brackets pass in an associative array with your new title like the example below: -

    comment_form(array('title_reply'=>'Leave a Comment'));

    You can also pass in other custom options or arguments as they are known in the programming world (listed here: http://codex.wordpress.org/Function_Reference/comment_form )

    example below: the title and submit button have been changed.
    comment_form(array('title_reply'=>'Leave a Comment', 'label_submit'=>'Submit Me'));

    Whatever you do, don't edit the core wordpress files directly, as well as having problems when you update wordpress you may also make a mistake and open up security holes and cause other problems you may believe are unrelated.

    Hope this clears things up...

  9. cybershot
    Member
    Posted 3 years ago #

    @HisKingdomProphecy

    Your fix did work for me running version 3.1.2

    Thanks for the tip

Topic Closed

This topic has been closed to new replies.

About this Topic