Change Comment Form Title “Leave a comment” to Custom

Here is simple WordPress PHP filter to change comment form title  “Leave a comment” to your own custom text, filter comment_form_defaults help you to change it using your theme function.php file easily but make sure.

comment form name

Also try our theme for better customization and support .

WordPress Theme

Copy below code and paste into theme function.php

add_filter('comment_form_defaults', 'set_my_comment_title', 20);
function set_my_comment_title( $defaults ){
 $defaults['title_reply'] = __('MY CUSTOM NAME', 'customizr-child');
 return $defaults;

MYTHEME > Function.php (usually found with this name and path)

Before editing code make sure take backup of file. If you have any question please post comment below.

9 thoughts on “Change Comment Form Title “Leave a comment” to Custom

  1. I was looking for a way to change the form title for a plugin that i am writing and found this snippet. Solved my problem. Thanks

  2. I am a beginner and facing many problems in optimizing my site. Your this post will help me in optimizing my WordPress site without any type of problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *
Email *