Hello,
For the translation, please try to add the below snippet code in the functions.php file of your child theme, and check.
function my_comment_placeholder_text() {
$text = __( 'MY TEXT', 'oceanwp' );
return $text;
}
add_filter( 'ocean_comment_placeholder', 'my_comment_placeholder_text' );
PS- function name and the text in the second step in the filter must match, it’s best to use different names for each translation the first one is the original string name.
You can try the below plugin for the reading post time.
https://ww.wp.xz.cn/plugins/reading-time-wp/
or following post: http://www.sweet-web-design.com/wordpress/how-to-add-post-reading-time-in-wordpress-without-using-plugin/3625/
first of all thanks for your answer.
for translations > is that code works with all snippts ? like comments , prev and next post text, reading time, you maight also like
for reading time , i want to use oceanwp function in meta tag so how can i fix that code to work with arabic to show the real time instead of 1 mins read
https://github.com/oceanwp/oceanwp/blob/690f380e72083b4735e4d71c65403303031ec6d7/inc/helpers.php#L3153
Hello,
The best and also the easiest way to translate any theme string is to install the Loco Translate plugin: https://ww.wp.xz.cn/plugins/loco-translate/
Before starting the translation, make sure to sync (refresh) the strings.
If your translation is not visible on the frontend just “move” the translation into the SYSTEM folder. Loco Translate has this option, so there is nothing specific you need to do about it.
For reading time, you need to write the custom function and I’ll pass this to the concerned dev team to look that what possible can we do for this.
Hello Abhishek, thanks again.
I will try that loco plugin thanks for the suggestion.
I thought I can edit the strings text manually, I tried your code it didn’t work well enough, thanks anyway.
For reading time, I am not talking about custom code I mean the existing code at the theme that showing at meta section ,the problem is the code work only with English posts and showing the real reading time like 9 mins read
but for Arabic posts it always shows “1 mins read” for all posts even it was 2000 words !!!
so how can I fix that code to work for posts in Arabic words and showing the real reading time.
https://github.com/oceanwp/oceanwp/blob/690f380e72083b4735e4d71c65403303031ec6d7/inc/helpers.php#L3153