Archived topic
Moving the language switcher to the 2nd last position
5 replies · Started by Dominic on March 31, 2022
Hello
First of all, GP is awesome! I really like to work with it. :)
I'd like to move the wpml language switcher in the main menu to the 2nd last position in the menu.
The wpml support told me, it is possible with custom css. But it depends on the theme and site structur.
Can you tell me if it is possible and if yes with what css code?
Here is the site: https://zeitler.swiss/zeitler-ag-home/
( i want to change the language switcher with the contact button)
Thanks for your help.
Dominic
Hi there,
How is the language switcher added?
The code suggested that the contact button and the language switcher are both menu items so couldn't you just swap them in the menu builder?
Hi Leo
There is no language switcher item in the wp menu settings, which you can choose.. you only can choose in the settings of wpml if you want the switcher at the frist or last position of the menu.
thanks for your help.
Hi Dominic,
I see. If that’s the case, here is a CSS code you may try:
li.menu-item:nth-child(5){
order:2;
}
li.menu-item:nth-child(6) {
order:1;
}
Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css
Adding this through Appearance > Customize > Additional CSS should work.
Hope this helps! Kindly let us know how it goes. :)
Hi Fernando
It worked! :)
Thanks for your help.
You’re welcome Dominic! Glad to be of assistance! Feel free to reach out anytime you’ll need assistance with anything else. :)