Before you ask please READ THIS

WPML Flags

Hi,

I've put the WPML chooser in the top menu. Works great but it's not showing the flags.
I've put it into "custom info 3" at Header Top Bar.
<?php do_action('wipml_add-language_selector');?>

Any changes recommended to show the flags?


Thanks,
Paul

Comments

  • AirAir
    Posts: 10,467
    Hello:-)

    I have just marked flags to show in WPML settings and they show up. See this:
    image

    image

    With kind regards.
    ss-2016-03-23_10-49-59.png
    1160 x 226 - 18K
    ss-2016-03-23_10-50-45.png
    707 x 147 - 8K
  • Hmm. Not with my site: www.cosignnv.com, but it's on another location. I'll try to add it on the right side to the menu.
  • Hi, actually it's much better after the menu. However the old one is still visible.
    I thought it was on that location because:
    I've put it into "custom info 3" at Header Top Bar.
    <?php do_action('wipml_add-language_selector');?>

    I deleted all customer info 3 in the layout section of the top bar. But it's still showing there. Very strange.
    Maybe I've added it by hand somewhere, but than my memory is very bad. Where can could I find the best way to have done this?

    Thanks,
    Paul
  • AirAir
    edited March 2016 Posts: 10,467
    OK I see - you wrote "top menu" but you really mean "top bar". For this one there would have to be made some changes in code. However if you don't need it now then just go to blame\advance\utilities\header.php line~121 and remove this code:

    if($wpml_active){
    //language switcher
    $languages = icl_get_languages('skip_missing=0&orderby=name&order=ASC');
    $lang_html = '';
    $selected_lang = '';
    $current_lang_code = ICL_LANGUAGE_CODE;

    //build languages list
    foreach($languages as $lang){
    if($current_lang_code === $lang['language_code']){
    $selected_lang = ''.$lang['native_name'].'';
    }
    else{
    $lang_html .= ''.$lang['native_name'].'';
    }
    }

    $lang_html .= '';

    echo ''.$selected_lang.$lang_html.'';

    }
    With kind regards.
    Post edited by Air on
  • Yep. Works like a charm.
    Awesome support!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!