• Hi,

    I’m trying to add the WPML language switcher in the footer menu only but can’t seem to find the ID. I’ve tried registering it myself but it just messes up my entire site. I’ve also tried everything I can think of, footer_credits, etc. Nothing works…

    This is the code I need the ID for:

    function new_nav_menu_items($items,$args) {
    if (function_exists('icl_get_languages') && $args->theme_location == '<strong>FOOTER ID</strong>') {
    $languages = icl_get_languages('skip_missing=0');
    if(1 < count($languages)){
    foreach($languages as $l){
    if(!$l['active']){
    $items = $items.'<li class="menu-item"><a href="'.$l['url'].'"> '.$l['native_name'].'</a></li>';
    }
    }
    }
    }
    return $items;
    }
    add_filter( 'wp_nav_menu_items', 'new_nav_menu_items',10,2 );

    and this is the website: http://frascati.elisewebtoronto.com/

    Thanks!

    https://wordpress.org/plugins/footer-putter/

  • The topic ‘WPML language switcher’ is closed to new replies.