Correct you HTML language declaration in Wordpress

 (Read 3269 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 1549
    • The Jucktion
Correct you HTML language declaration in Wordpress
« on: Feb 24, 2015, 05:54 PM »
So i just found out that the html language declaration is somewhat important for search engines to understand which language the page is displayed in. So, i checked our site and the theme doesn't seem to support that feature. And i went ahead and found a code that does this automatically on WordPress and is pretty simple to implement.

Just open up your "header.php" file on the web editor of through FTP, then find the code
Code: [Select]
<html xmlns="">
and replace with

Code: [Select]
<html xmlns="" <?php language_attributes(); ?>>
then your html tag with change from simple xmlns declaration to the language declaration in your wordpress settings.

Code: [Select]
<html xmlns="" lang="en-US" prefix="og: fb:">
Just a simple trick here though as every single bit helps.


Best Affiliate Program