• Hello again,

    I use two languages on my website and I need to be able to change lang=””. So I have tried to override language_attributes(); using he following code

    function __language_attributes () {
    if (is_page(array(6001,5924,5481,5443,5433,5341,5339,5328,1178,1177)))
    return ‘lang=”pl”‘;
    }
    add_filter (‘language_attributes’, ‘__language_attributes’);*/

    It works just fine but then “lang=”” disappear completely on other pages.

    I really appreciate any help with this one.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Your code is not returning if it is not those pages, you need to return the string you are filtering even if you do not change it.

    For example:

    function __language_attributes ( $string ) {
     if ( is_page(array(6001,5924,5481,5443,5433,5341,5339,5328,1178,1177))) {
       return 'lang="pl"';
     }
     return $string;
    }
    Thread Starter multidimentional

    (@multidimentional)

    Fantastic! Thank you very much.

    I also noticed that right click does not work. Is it a “hidden” feature of the theme?

    Not sure if I should start another thread.

    The theme does not remove right-click, that would have to be something else, perhaps a plugin you have.

    Ben

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

The topic ‘language tag declaration’ is closed to new replies.