Hello Karin,
To change ‘posted on’ to say ‘dutch’, just add the below codes in ‘functions.php’ of child theme.
add_filter( 'gettext', 'theme_change_postedon_field_names', 20, 3 );
function theme_change_postedon_field_names( $translated_text, $text, $domain ) {
if ( is_singular() ) {
switch ( $translated_text ) {
case 'posted on' :
$translated_text = __( 'dutch', 'zerif-pro' );
break;
}
}
return $translated_text;
}
Note: This function translates all the matching text to the translating text allover the theme.
Also,It is recommended to create child theme if you are going for the coding option else your changes won’t be saved when you update the theme. For that: https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme
Let me know how it goes!!
Hi
Thanks for your support but it does not work unfortunately..
Is there a special area where i have to put the code??
Regards
Karin
Btw: i want to translate the words “posted on” in:
“geplaatst”op”…that is dutch for posted on…
Hope you can help me…
Hello Karin,
It’s seems you are having creating child theme manually,right?
You can create the child theme using this plugins:https://wordpress.org/plugins/one-click-child-theme/
After activating the child theme, go to Appearance-> Editor -> functions.php paste the following code in the bottom empty area.
add_filter( 'gettext', 'theme_change_postedon_field_names', 20, 3 );
function theme_change_postedon_field_names( $translated_text, $text, $domain ) {
if ( is_singular() ) {
switch ( $translated_text ) {
case 'posted on' :
$translated_text = __( 'geplaatst op', 'zerif-pro' );
break;
}
}
return $translated_text;
}
After pasting the code click Update File.
Let me know how it goes!!