Forum

[Closed] Change H3 comment  

   RSS

0

Hi, I have a doubt.
I have child theme.
How can I change the H3 of the title "Leave your comment" to <div>?

1 Answer
0

Hello GabiF,

In order to change the tag, you must use a filter, "comment_form_defaults". For reference, you can see, https://developer.wordpress.org/reference/hooks/comment_form_fields/ .

For example:

function functionname( $args ) {

$args['title_reply'] = __( 'Leave a comment', 'textdomain' );
$args['title_reply_before'] = '<div>';
$args['title_reply_after'] = '</div>';

return $args;
}
add_filter( 'comment_form_defaults', 'functionname' );

Best regards.

Browse our handcrafted free & pro themes.

Get things done easily with our custom crafted services.

Fall in love with our friendly support team.

Please Login or Register