comment_form_defaults filter allow to change comment form title “Leave a comment” to other custom text, filter comment_form_defaults help you to change it.
<?php
add_filter( 'comment_form_defaults', 'cxc_change_comment_heading_callback', 20 );
function cxc_change_comment_heading_callback( $defaults ){
$defaults['title_reply'] = __('Leave a Reply', 'cxc-codexcoach');
return $defaults;
}
?>
Code goes in function.php file of your active child theme (or active theme).
Was this article helpful?
YesNo