How to Rename Post Comment Button in WordPress

Here’s a handy PHP code snippet which allows you to rename the submit button of WordPress comment form.

Quick Tip : How to Create page on theme activation

All you need to do is copy the following code snippet and paste it inside your functions.php file located inside your theme directory.

function wpdocs_comment_form_defaults( $defaults ) {
  $defaults['label_submit'] = __( 'Reply' );
  return $defaults;
add_filter( 'comment_form_defaults', 'wpdocs_comment_form_defaults' );

And don’t forget to change Reply with your own custom text.


Leave a Comment.