I want to add languages name instead of flags in polylang dropbox menu. Is there any way to do this?
Asked
Active
Viewed 1,578 times
1 Answers
1
You can try to use pll_the_languages() function and play with the different arguments. For your requirements, you could do something like this:
<!-- outputs a dropdown list of languages names -->
<?php pll_the_languages( array( 'dropdown' => 1 ) ); ?>
UPDATE:
If you use Widget for Language Menu, you can set these options there. Just go to Dashboard > Appearance > Widgets, expand the "Language Switcher" widget that has been added on the Sidebar and select the appropriate options.

user8230352
- 1,775
- 1
- 9
- 13
-
Can you please tell me where I should add this? – Hammad Ahmed Jul 22 '17 at 10:30
-
Updated an answer. – user8230352 Jul 22 '17 at 10:37
-
I am using betheme and I did add the language switcher like you but the flags are not going from the main menu. – Hammad Ahmed Jul 22 '17 at 10:40
-
So the flags are already added in a theme, you just want to change the behavior? – user8230352 Jul 22 '17 at 10:49
-
Yes I just don't want flags on main menu. – Hammad Ahmed Jul 22 '17 at 10:53
-
If the language switcher is on the main menu, they are probably added in a template file. Maybe the code is in the header.php. If the language switcher is on a sidebar, they are probably added by using Widgets. – user8230352 Jul 22 '17 at 10:59