Support » Plugins » WMPL – Language switcher – Flags only

  • Hello WordPress Team,

    I’m looking for a solution on how to integrate a language switcher, only with flags, into my website.
    I work with wmpl and inserted the proposed code in to function.php (see below) of my Merchant theme. This didn’t lead to desired results. The fact is that I have several themes on the website: Can anybody advise how to go on? Your reply is very appreciates.

    Best regards,



    function language_selector_flags(){
        $languages = icl_get_languages('skip_missing=0&orderby=code');
            foreach($languages as $l){
                if(!$l['active']) echo '<a href="'.$l['url'].'">';
                echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" />';
                if(!$l['active']) echo '</a>';

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

  • The topic ‘WMPL – Language switcher – Flags only’ is closed to new replies.