• Resolved muchmuch11

    (@muchmuch11)


    On my 2nd line of source page I have this
    <html lang="en-US" prefix="og: https://ogp.me/ns# fb: https://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)

    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;
    }

    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

    (@muchmuch11)

    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.