• Now I am getting into the area of meta tags to be included in the WordPress platform.

    My blog has certain posts in English, and other posts in Spanish.

    How can I specify properly which language those post would be for the search engines and social websites?

    Maybe somebody with WordPress websites / blogs have experience on how to properly structure the data and meta tags to cover different languages and territories in which your pages are supposed to be targeting?

    • This topic was modified 4 years, 11 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The page’s language is set as an attribute in the overall <html> tag. Themes should be using the language_attributes() function to do this, so you could use the corresponding ‘language_attributes’ filter to change what value is set. You could alter what this is by a meta value saved in every post if the page is for a single post. In the case of archive listings that could be in both languages, leave the setting be the default which is the language your WP site is set for.

    Thread Starter tu586

    (@tu586)

    Thank you..

    Wordpress does have a Language setting for the entire site which I selected for English US. Not sure if it matters or even possible to leave it blank.

    I have added Open Graph meta tags to blog pages to specify it to Facebook.

    In general I think Google doesn’t pay attention to language meta tags because they say in most cases people set them wrong. (I suppose many people want more coverage than the actual language in which the website is actually written)

    But maybe Facebook and Bing and other places might pay attention to Language tags.

    I was wondering, besides adding meta tags, would there be any other changes I need to do do to the website? Would I need to add a language specific folder? en/ or es/ ?

    It would be a pain in the butt to separate each post and try to put them into language specific folders specially coming from posts out of the very same WordPress blog which just happened to be written in different languages. Trying to separate the blog is also a pain in the butt because WordPress doesn’t have that functionality.

    Anyway… as of now I am just adding the Open Graph tags.. I hope that does help some.

    Moderator bcworkz

    (@bcworkz)

    You need a language specification to have a compliant page. Whether Google uses it or not is somewhat beside the point. It ought to correctly reflect what the predominant language of the page is. If that is different than the site’s setting, it can be modified as I described previously.

    Structured data is the only other place a language spec might show up AFAIK. OG tags will help immensely if you share your posts on social media. Whether it helps with SEO I couldn’t say. It certainly doesn’t hurt.

    I believe Google tries to determine language from content. As you say, it ignores the language attribute because it’s often wrong. This has led to mis-identification of a page’s “language” when there are very few written words on the page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I specify a language for my blog post?’ is closed to new replies.