Change Comment Form Title “Leave a comment” to Custom

Categories:

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.

Comments

13 responses to “Change Comment Form Title “Leave a comment” to Custom”

  1. Kapil Garg Avatar

    Nice post. thanks for sharing wit us.

  2. maxi Avatar
    maxi

    Nice work

  3. Matt Johnson Avatar
    Matt Johnson

    Nice job. thanks for sharing with us.

  4. foster Avatar
    foster

    nice post,thank you

  5. Website development Agency Avatar

    Love to using wordpress PHP Filter thanks for updating us keep sharing

  6. clavit Avatar
    clavit

    Thanks for sharing this information. It’s always helpful to read the content on your blog.

  7. Aditya Avatar
    Aditya

    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

  8. Boundbuzz Avatar
    Boundbuzz

    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.

    1. Sandy Avatar

      Please send your website URL from contact us page.

  9. Steven Gordon Avatar
    Steven Gordon

    this is help me so much in my learning Thank you for sharing

  10. Christopher Emmanuel Avatar
    Christopher Emmanuel

    Thank you

  11. Jide Avatar
    Jide

    Thanks, it works

Leave a Reply

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