Link preview (facebook and twitter) with different language
-
Hello everyone!
I have a problem with the language generated in the preview regarding Facebook and Twitter (I live in Italy and I have servers in Germany, my audience is Italian).
The preview is generated sometimes in German and sometimes in Turkish, not in Italian or English.
I have specified the location of the server because I have already contacted them. The server timezone is set in Rome (Italy) and is therefore ok.I had recovered this snippet :
add_filter( ‘the_content’, ‘facebook_sdk_replace’ );
function facebook_sdk_replace( $content ) {
if ( is_single() ) {
$content = str_replace(“/de_DE/”, “/it_IT/”, $content);
$content = str_replace(“/tr_TR/”, “/it_IT/”, $content);
}
return $content;
}(only for facebook, for twitter I have not recovered anything) but it seems not to work. Can anyone show me the way to resolution?
Thank you!
- You must be logged in to reply to this topic.