I don't have display as dropdown in Appereance -> Menu -> Language switcher. How can i solve it?
Here is an image
Any help will be appreciated...
I don't have display as dropdown in Appereance -> Menu -> Language switcher. How can i solve it?
Here is an image
Any help will be appreciated...
You should alternatively use the PHP function to display it, try this
<?php pll_the_languages( array( 'dropdown' => 1 ) ); ?>
The documentation is here - https://polylang.pro/doc/function-reference/#pll_the_languages
dropdown
argument (desktop
, mobile
). The point is that if you use it twice on your page (e.g. mobile and desktop menu) the generated code won't work with 1
as the value (because of non unique DOM id). –
Armenian In appearance->menus, go in screen options on top right of you screen and check the “Language switcher” checkbox. You then should have a new metabox which allows to add a language switcher just as you add another menu item.
@NJENGAH's answer is correct.
Additionally, if you would like to have 2 drop-downs on the same page, i.e. header and footer, increment the dropdown
array value for the subsequent calls by 1
.
<?php pll_the_languages( ['dropdown' => 2 ] ); ?>```
and so on...
© 2022 - 2024 — McMap. All rights reserved.