ArticlesDownload

how to change read more text in woocommerce

woocommerce

Edit the functions.php File

Next, head over to the Appearance > Theme Editor console and locate the functions.php file in your child theme.

Copy and paste in the following code before the closing PHP ?> bracket:

1
add_filter( 'gettext', 'ds_change_readmore_text', 20, 3 );

function ds_change_readmore_text( $translated_text, $text, $domain ) {
if ( ! is_admin() && $domain === 'woocommerce' && $translated_text === 'Read more') {
$translated_text = 'Your custom text';
}
return $translated_text;
}

Related Articles

Leave a Reply

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

Check Also
Close
Back to top button