How to change the “Leave a comment” text in WordPress ?

This text can be altered with a WordPress filter hook comment_form_defaults

In the following code, simply replace Custom leave a comment by your own text :

 

add_filter('comment_form_defaults', 'set_my_comment_title', 20);
function set_my_comment_title( $defaults ){
  $defaults['title_reply'] = __('Custom leave a comment', 'customizr-child');
  return $defaults;
}

3 thoughts on “How to change the “Leave a comment” text in WordPress ?”

Comments are closed.