Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #20678

    Hi All,

    is there any well-known reason why my WPML plugin is not appearing correctly as a language dropdown selector within main home menu?

    The strange point is, that eveything looks ok under the main shop menu… (WooCommerce)

    in addition to this confusion: if i choose under “adjust flagship” the “static site” radio button, instead of “last article” (translated from german, sorry, not sure about exact english name), the language selector is appearing suddenly correctly within the main home menu, however only if i choose no options for “article” and ” starting site”… but this is not a appropriate solution, as it is able to save/publish…

    I have deleted and re-installed over and over all other plugins, it seems not to be a non-compability plugin issue… I assume…=)

    Any idea?

    Thanks and regards



    Hi Armin,

    Can you provide a link to your site so we can take a look? I’m not very familiar with the implementation of WPML but I’ve tagged the topic for another of the support crew who is.




    hi devin,

    here you go, grateful for any help:

    current status: 9 of 10 flags (german flag not) are appearing permanently (they should appear after hover over german flag), after added in functions.php as follows:

    function new_nav_menu_items($items) {

    if (function_exists(‘icl_get_languages’)) {

    $languages = icl_get_languages(‘skip_missing=0’);

    if(1 < count($languages)){

    foreach($languages as $l){


    $items = $items.'<li class=”menu-item”>'.$l.' ‘.$l.’‘;





    return $items;


    add_filter( ‘wp_list_pages’, ‘new_nav_menu_items’ );

    add_filter( ‘wp_nav_menu_items’, ‘new_nav_menu_items’ );




    This code will generate a list of flags and not a dropdown. If you want to show a dropdown open up sidebar.php and replace:

    $menu = wp_nav_menu($args);
    echo "</div>";


    $menu = wp_nav_menu($args);
    echo "</div>";

    and make sure that you selected the “dropdown” switcher on the WPML settings page.


    hi dude,

    no, that didn´t work.

    your code created a selector with frame and without dropdown function.

    i need just just the flag of currently used language WITHIN sidebar menu, and when hover over the flag, the other language options shall appear as flags, just like in my shop:

    i don´t understand, why my shop is showing language plugin correctly in the sidebar menu, however main home menu page does not…

    i am desperate…




    Tbh I’m not sure why it’s working on the shop page and not on other pages. Maybe the reason is that your pages are not translated yet? I noticed that the German flag is displayed on all pages and it seems like the page content is “in German”. The shop page displays all flags, however when I click on a flag I get an empty archive page because the products are not translated yet. Try to create some translated entries and check if this solve the issue. I think the language switcher relies on the get_current_language() function which can be found in wp-contentpluginssitepress-multilingual-cmssitepress.class.php and this function will strip “missing” languages (otherwise the user would just get a “post not found” message).

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘WPML => menu issue with Flashlight?’ is closed to new replies.