How To Change Html Lang En-Us To En Wordpress

How to change html lang en-US to en WordPress – here is the syntax of the HTML lang attribute:

html lang = "language_code"

In the above syntax, language_code is used to specify the ISO language code.

For example, if the content language is English, then the language code should be β€œen”:

html lang = "en"

Similarly, if the content is in the French language, the language code should be:

html lang = "fr"

Methods to change your WordPress html language.
Add a filter inside function.php

add_filter( ‘language_attributes’, ‘setLangAttr’ );

function setLangAttr() {
return ‘lang=”en”‘;

Add define inside wp-config.php

define (‘WPLANG’, ‘en’);

Download and install this plugin HTML Global lang Attribute.


Leave a Reply

Your email address will not be published. Required fields are marked *