Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, I came across this post after all day of reaseach on custom link I was able to fix it by creating two menus, one in english (Nav_en) and one in spanish (Nav), which is also selected as default menu, and default language is Spanish. Then on Header.php I added this code:

    <?php

    if(qtrans_getLanguage()==’en’) // put your code here if the current language code is ‘en’ (English)
    {

    wp_nav_menu( array(‘menu’ => ‘Nav_en’ ));

    } elseif(qtrans_getLanguage()==’es’) // put your code here if the current language code is ‘es’ (Espa?ol)
    {
    wp_nav_menu( array(‘menu’ => ‘Nav’ ));
    }
    ?>
    Maybe this will work for someone too, Cheers!!

    Hi!! I was having the same problem, but using qtranslate, I solved it using 2 navigation menus and calling each other with a drop down selection. Maybe you can adapt it to work with xili. Hope it helps!!

    <nav id=”-main-menu”>
    <?php
    if(qtrans_getLanguage()==’en’) {
    // put your code here if the current language code is ‘en’ (English)
    wp_nav_menu( array(‘menu’ => ‘Nav_en’ ));

    } elseif(qtrans_getLanguage()==’es’) {
    // put your code here if the current language code is ‘id’ (Espa?ol)
    wp_nav_menu( array(‘menu’ => ‘Nav’ ));}?></nav>

    <div> <?=qtrans_generateLanguageSelectCode(‘dropdown’);?> </div>

Viewing 2 replies - 1 through 2 (of 2 total)