Title: removing lang from html attribute
Last modified: August 31, 2016

---

# removing lang from html attribute

 *  Resolved [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * (@muchmuch11)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/removing-lang-from-html-attribute/)
 * On my 2nd line of source page I have this
    `<html lang="en-US" prefix="og: http://
   ogp.me/ns# fb: http://ogp.me/ns/fb#">`
 * I want to remove `lang="en-US"` only. How to do so?
    Without deleting `<?php 
   language_attributes(); ?>` from my header.php
 * I’m planning to write language attribute lang directly, because I want my site’s
   admin’s side in English but with language attribute in my local language.
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Anonymous User 14733231
 * (@anonymized-14733231)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/removing-lang-from-html-attribute/#post-7067443)
 * Try This code in your fundction.php
 * **add_filter(‘comment_form_defaults’, ‘remove_comment_styling_prompt’);**
 * function remove_comment_styling_prompt($defaults) {
    $defaults[‘comment_notes_after’]
   = ”; return $defaults; }
 *  anonymized-13749270
 * (@anonymized-13749270)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/removing-lang-from-html-attribute/#post-7067458)
 * Simple. Add this to your functions file or with a plugin:
 * `add_filter('language_attributes', '__return_false');`
 * Or if you want to use custom string, do something like:
 *     ```
       add_filter('language_attributes', function(){
       	return 'custom';
       });
       ```
   
 *  Thread Starter [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * (@muchmuch11)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/removing-lang-from-html-attribute/#post-7067510)
 * Hi.. thanks both of you. I thought my question gonna get buried.
 * Samuel’s answer works flawlessly.
 * Previously I was using ‘locale’ instead of ‘language_attributes’ on filter to
   change printed html language, my admin’s side got a little bit weird that some
   plugins using my local language while the rest of admin using English 😀
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘removing lang from html attribute’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/removing-lang-from-html-attribute/#post-7067510)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
