How To Change Default “Comment” Button Text In WordPress

Quick Summary

  • Filter comment_form_defaults and set its label_submit key to replace the default Post Comment text on the submit button.
  • Add the code to your child theme's functions.php, and wrap the label in __() with your text domain on translated sites.
  • The filter only works when your theme prints the form with comment_form(); otherwise edit the button in the comments template.

WordPress labels the submit button under the comment form Post Comment. To change that text without editing your theme’s template files, filter the default settings of the comment form.

Add this code to your child theme’s functions.php file:

PHP
//CHNAGE COMMENT BUTTON TEXT
function theme_name_change_comment_form_submit_label($arg) {
$arg['label_submit'] = 'Add Your Custom Text Here';
return $arg;
}
add_filter('comment_form_defaults', 'theme_name_change_comment_form_submit_label');

How it works

comment_form() builds the comment form from an array of default settings, and the comment_form_defaults filter lets you change that array before the form is printed. The label_submit key holds the button text.

  • Replace 'Add Your Custom Text Here' with your own label, such as Send or Leave a reply.
  • If your site is translated, wrap the text in __() with your theme’s text domain so translation plugins can pick it up.
  • The filter only works when your theme prints the form with comment_form(). If the theme builds its own form markup, edit the button in the theme’s comments template instead, ideally in a child theme.
Share on X (opens in a new tab) Share on LinkedIn (opens in a new tab) Share on Facebook (opens in a new tab)

ChatGPT (opens in a new tab) Claude (opens in a new tab) Gemini (opens in a new tab) Perplexity (opens in a new tab) Grok (opens in a new tab)

More Insights

See More