Archived topic
Can I Put Language Swicher in the Header of Mobile View
5 replies · Started by yitegele on January 10, 2023
Hi GP Team!
How are you?
Can I put the language swicher (drop down flags) in the Header of mobile view, instead of in the Off Canvas Menu?
The plugin is Polylang Pro.
Thank you.
Hi there,
use a Hook Element, add the Polylang Shortcode, and set the Hook to: generate_menu_bar_items
This will place it to the side of the menu / menu toggle on desktop and mobile.
if need be you can hide it with CSS on desktop.
Hi David!
How are you?
I've tried to ask Polylang about the Shortcode, but they said "There's no shortcode in Polylang".
I went throught the document "https://polylang.pro/doc/the-language-switcher/", but it seems not very specific for a non-technician like me.
I also try to add an element, but you will see the result from below link.
I'm currently using Polylang Pro with full function. Could you please help with it? Thank you!
In the Hook Element, can you make sure the Execute PHP is checked ?
Hi David!
Thank you. After I check the Execute PHP, it seems better, only the layout seems a little bit odd, but we deal with it later.
Now the problem is this element is not working in mobile/tablet view. Please help with it.
My current "customize - Layout - Header - Mobile Header" is off, beacause I want to show both logo and site title, instead of only one of them.
Hi there,
Try adding this CSS:
.inside-navigation .menu-bar-items ul {
display: block;
}