Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Change "comment" button text WordPress

  • SOLVED

Hi,
I need to change comment button text (ref: the button to submit a comment, id=submit).
Could you please help me?

Answers (3)

2014-02-07

Sébastien | French WordpressDesigner answers:

in functions.php, add this :

function wpsites_change_comment_form_submit_label($arg) {
$arg['label_submit'] = 'Custom Comment Form Submit Button Text';
return $arg;
}
add_filter('comment_form_defaults', 'wpsites_change_comment_form_submit_label');


replace "Custom Comment Form Submit Button Text" by the text you want, of course.



src : [[LINK href="http://wpsites.net/web-design/style-comment-form-submit-button/"]]http://wpsites.net/web-design/style-comment-form-submit-button/[[/LINK]]


tomaso1980 comments:

great! it's working

2014-02-07

Navjot Singh answers:

In your comments.php file you will see a text like

<input class="button" name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />

You can change the value field to whatever you want.


tomaso1980 comments:

I haven't

<input class="button" name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />

in my theme

2014-02-07

Hariprasad Vijayan answers:

Hello,

Try this

$comments_args = array(
// change the title of send button
'label_submit'=>'Send',
// change the title of the reply section
'title_reply'=>'Write a Reply or Comment',
// remove "Text or HTML to be displayed after the set of comment fields"
'comment_notes_after' => '',
// redefine your own textarea (the comment body)
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><br /><textarea id="comment" name="comment" aria-required="true"></textarea></p>',
);

comment_form($comments_args);

Check http://codex.wordpress.org/Function_Reference/comment_form for more details.