Okay
  Public Ticket #330514
WPML Hiding Active Language
Closed

Comments

  • Joseph started the conversation

    I looked at some earlier questions regarding WPML and the top nav, but I haven't quite been able to find out how to hide the currently active language in the language selector. I see where it's happening in header.php:

    See attachment

    However, where would I be able to filter the language selector to hide the active language.

  •  8,847
    Tahir replied

    Hey!

    I believe you should be able to hide it using some custom css. There must be a class added in the menu which shows the current language highlighted so we can use that to hide it. 

    If you can remove the maintenance mode i can write up some css for you. 

    Thanks 


    ThemeNectar Support Team 

  •   Joseph replied privately
  •  8,847
    Tahir replied

    Hey!

    Add this into the Custom CSS box located in your Salient Options panel :
    html[lang="zh-hans"] a[href="#"] {
        display: none !important;
    }
    html[lang="en-US"] a[href="#"] {
        display: none !important;
    }
    
    Thanks 


    ThemeNectar Support Team 

  •   Joseph replied privately
  • Joseph replied

    Tahir,

    I wanted to update your code, because I found that the code above also hides all the portfolio filters! Not good.

    html[lang="zh-hans"] li.menu-item-language a[href="#"] {
        display: none !important;
    }
    html[lang="en-US"] li.menu-item-language a[href="#"] {
        display: none !important;
    }
    

    This will hide the active language, but it will not make your portfolio filters disappear :)

    Joseph

  •  8,847
    Tahir replied

    Thanks for the follow up. 

    Cheers


    ThemeNectar Support Team