Archived topic
Change "Leave a comment" text?
6 replies · Started by Henry on April 29, 2019
Does anyone know if it is possible to change the generic "Leave a comment" text before the comments? I tried this function but no joy:
//change text to leave a reply on comment form
function isa_comment_reform ($arg) {
$arg['title_reply'] = __('Leave a Comment:');
return $arg;
}
add_filter('comment_form_defaults','isa_comment_reform');
Thanks that's perfect.
Glad to be of help
Anything more specific that is step by step? I simply want to change the output text of "Leave a comment" to "Leave Your Review".
Solved it by hopping around a bit. The answer for any newbie that needs help is to simply download the "Code Snippets" plugin and activate it.
Next step is to go to the section to add a new snippet in that plugin, and paste the following code:
add_filter( 'generate_leave_comment','tu_custom_leave_comment' );
function tu_custom_leave_comment() {
return 'PUT WHAT YOU WANT HERE';
}
In the section where it says "PUT WHAT YOU WANT HERE", you can change that to whatever text you want and it will replace "Leave a Comment" with your new text.
Glad you've figured out :)