Responsive WordPress Theme – Caliber

A theme with simple controls and limitless potential. Work fast and build an amazing website!   Find out more »

UpThemes – Beautiful WordPress Themes

Create a site your church, gallery, newspaper, blog, recipes, band and more!   See the themes »

Need a little help?  Find answers quickly by searching the forum.
Group Admins
  • jeffw
  • ljungi
  • maxleondalheimer
  • admin
Group Mods
  • malekovitch

Support for: Vellum – Responsive WordPress Theme

Vellum

Public Group  |  active 1 month, 1 week ago ago
Viewing post 1 to 7 (7 total posts)

Can’t place WPML language selector in main menu

  • alex2020

    said

    HI, it’s an awesome theme, congratulations.

    i’m tryng to place de language selector WPML in the main menú and it not appears.

    i want to show de selectorat the right of de search. how can i do this.

    thanks in advance

  • andy

    said

    I’m not sure why it isn’t working but I will look into this. I’m wondering if this could be related to UberMenu and will check with SevenSpark to confirm if it could be an issue.

    Are you able to use the WPML widget to add a selector for the time until I can investigate and determine the cause of the problem?

  • alex2020

    said

    i can place the selector under the logo, but i want to place it after or before the search icon in the main menu, i’m using
    full with-top header

  • andy

    said

    The search icon isn’t a part of the actual menu, at least it isn’t generated by the WordPress menu function. To get the selector exactly where you want might require using a function in the PHP where it’s wanted.

    Do you now if WPML includes a function that can be inserted in the code to add the language selector? We may need access to that. If it exists I can give you instructions on where in the theme to add this function.

    I have sent an email to find out more about any possible conflict with UberMenu Lite and well see if that could be effecting this in any way.

  • alex2020

    said

    i think de code is:

    // Filter wp_nav_menu() to add additional links and other output
    function new_nav_menu_items($items) {
    $LangLink = custom_menu_flag();
    $items = $items.$LangLink ;
    return $items;
    }
    add_filter( 'wp_list_pages', 'new_nav_menu_items' );
    add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );
    
    function custom_menu_flag(){
    $languages = icl_get_languages('skip_missing=1');
    if(1 < count($languages)){
    foreach($languages as $l){
    if(!$l['active']){ echo '<ul id="nav" class=""><li class="menu-item"><a href="'.$l['url'].'">';
    echo '<img src="'.$l['country_flag_url'].'" height="12" alt="'.$l['language_code'].'" width="18" /></a></li></ul>';
    }
    }
    }
    }
  • andy

    said

    It looks like this might be a simple case of some extra CSS needed. There were a couple topics on WPML regarding UberMenu:

    http://wpml.org/forums/topic/language-switcher-in-ubermenu/
    http://wpml.org/forums/topic/wpml-and-ubermenu-language-switcher/

    To go forward from here I’ll need to see your website and have a login to test. You can email login details to support@parallelus.net and please include a link to this topic so we know what the email is in reference to. Thanks!

Viewing post 1 to 7 (7 total posts)