top of page

[FIX] Pages Have No Hreflang and Lang Attributes




How to Fix Pages That Have No Hreflang and Lang Attributes

How to Fix Pages That Have No Hreflang and Lang Attributes This just is talking about the language that your website is in, and that’s most likely going to be English.

That’s the language or the Lang attribute. The atrial flying is a little bit different. That’s going to apply if you have international versions, different languages of your website, or maybe something that same language also English, but you want it to apply to a different part of the world, like the EU or UK.

Maybe you have, something for Australia and you just, it’s a different, different text perhaps, still English, but perhaps you’re just saying different things to appeal to a local market.

Chances are, you’re just gonna want to have, the language attribute here. If you are running into a trough Lang issues and you need to have, different languages or, or you’re selling things overseas and you need to have different currencies, that’s going to be a whole, that’s going to be a much bigger topic actually, but the language attribute is pretty easy to fix.

I’ll show you how to log into your WordPress dashboard. Scroll down over appearance in the left-hand navigation and click on theme editor.

Once in the theme editor, look for the header heterodox PHP file. It will most likely be named theme header. Although that may differ a little bit, depending on your theme, just make sure that it says header PHP, in parentheses neath the name of it and once you’re on this page, you’re going to want to insert your language attributes here right after the doctype probably before.

In fact, definitely before the head tech, now this is often done by WordPress and they’re going to install, some default code in here.

This is PHP code here, but you don’t necessarily need PHP code. So if you’re missing a Lang attribute, just cut and paste the text, from, from on this screen, put it into the second line, keep it on the line all by itself.

Once that is there, click update and you should be good to go and if you do happen to need, another language or your site is not in English, then you’ll want to start to check out our tutorials on the atrial flag issues.

Related Posts

See All
bottom of page