duplicated languages string/flags with pll_the_languages
-
Hello, thanks for developing Polylang.
I am having a weird issue when using pll_the_languages function. The list of languages it outputs is duplicated, there are 2 flags/strings for each language.
This is the code I’m using in functions.php:
/* Add Polylang-plugin language switch to header*/ function add_language_switch() { // check existance of pll_the_languages to prevent wordpress for breaking when Polylang is not available (for example when being updated) if (function_exists('pll_the_languages')) { echo '<ul>' . pll_the_languages(array('show_flags'=>1,'show_names'=>0)) . '</ul>'; } else { echo 'Polylang not available'; } } add_action('mytheme_header','add_language_switch', 30);What am I doing wrong?
Also is this a good way to use Polylang?On a side note, when I add polylang switcher to the menu through the wordpress menu settings the languages are not duplicated.
Thanks in adv.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘duplicated languages string/flags with pll_the_languages’ is closed to new replies.