Site logo

Archived topic

How to change Leave a comment text?

3 replies · Started by Rishabh on August 17, 2020

Viewing posts 1–4 of 4

Hi there,

Try this:

add_filter( 'gettext', function( $text ) {
    if ( 'Leave a comment' === $text ) {
        return 'Your new text';
    }

    return $text;
} );

add_filter( 'gettext', function( $text ) {
if ( 'Leave a comment' === $text ) {
return 'Your new text';
}

return $text;
} );

This code is not working for me.
Please help me.

This archived topic is closed to new replies.