How to change inLanguage in Schema markup
-
Hello,
I have a website with content in 3 languages. I use custom functions in my theme’s functions.php to change locale for 2 of them. I also have a sitemap that maps posts to their respective hreflang tag.
I just noticed, however, doing an advanced search on Google and using the Language field, that Google, while properly returning results for 2 of the languages, is returning posts in all 3 languages when I search for the main language.
In the Schema markup added by Yoast, I’ve noticed there’s a field “inLanguage” that is set to the main language no matter what locale or hreflang the posts have. So I’m guessing this is what is making Google list all the posts as if from the main language.
Is there a way to customize the output of this inLanguage field?
Thanks a lot,
CB
- The topic ‘How to change inLanguage in Schema markup’ is closed to new replies.