Fixing incorrect hyphen and capitalization
-
This is a very nice plugin, however it haven’t been updated for a while and it is no longer follow the SEO best practice for hreflang tag
However, fixing it is easy, all you have to do is download the plugin,open languageselectorrelatedclass.php, in line 139, replace “_” with “-” in this line of code
$hreflang .= "-".$link['country'];
and add this line
$hreflang = strtolower($hreflang);
after it.Now you will have the correct hreflang tag
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fixing incorrect hyphen and capitalization’ is closed to new replies.