Hi, I want to change Leave a Reply text in the comments, I found the wp-comments.php file, but i dont see it there…
Hi Andrew,
Thanks for writing in! You can setup a child theme and activate it by following this guide (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57) and then you can add the following code into your child theme’s functions.php file and change text accordingly.
// Change Strings
add_filter( 'gettext', 'translate_x_strings', 20, 3 );
function translate_x_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'Comments' :
$translated_text = __( 'Change as Discussion', '__x__' );
break;
case 'Leave a Reply' :
$translated_text = __( 'Change as Reply', '__x__' );
break;
}
return $translated_text;
}
Hope that helps.
Thanks! thats perfect, i am using a child theme.
You are most welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.