Change language on view post button

Hi.
We are working on this page: http://test.blommenhofutbildning.se/news/
Is it possible to change the “view post” text to something else? In swedish?

Tomas

Hi Tomas,

Thanks for writing in! There are many ways to translate it. You can use Poedit, gettext or third party plugin like WPML.

Kindly refer to the link below for your guide.

Hope that helps.

Ok. I am using Loco translate and have found the “view post” in the Wordpress translation. But it looks like it is already translated - but the translation is not shown on the actual page:

Hello Thomas,

Thanks for updating the thread. :slight_smile:

Providing support for 3rd party plugin falls outside the scope of support we can offer.

I suggest you to add following code in your child theme’s functions.php file:

function custom_text_translate($translated) {   
  $translated = str_ireplace('View Post', 'Change text', $translated);
  return $translated; 
}
add_filter('gettext', 'custom_text_translate' );

Replace Change text as per your requirement.

You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

Thanks.

Perfect. Thanks. I installed a child theme and used the code that you provided.

You’re most welcome! The other text could be from another text domain too, so you may check each pot files of the theme/cornerstone. Still, that code should do the job too :slight_smile: Cheers!

It did the trick. Thanks the best wordpress theme and support on the planet😁

Thanks for the good words. You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.