The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WMPL - Language switcher - Flags only (1 post)

  1. wzag
    Posted 3 years ago #

    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: http://www.stopp-schnarchen.de. 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.]

Topic Closed

This topic has been closed to new replies.

About this Topic