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

    Hi,

    I’m using the WPML language switcher in the main menu.
    The problem is that enfold pushes a second wpml navigation, so I get the language switcher twice.
    I’ve been running through all support tickets concerning this issue, but none serves a correct solution.
    I can cheat it with CSS so the navigation items become invisible, but the CSS doesn’t work on mobile with the new burger menu.

    li.av-language-switch-item {
        display: none;
    }
    

    I’m stuck with 2 “empty” navigation items and I’d like to see them simply out of the source code.
    How can I do this? See screenshot what happens.
    Screen_Shot_2017_07_21_at_15_37_09

    This ‘double menu’ automatically happens when you configure WPML to have the switcher in the main menu. Again it’s doable by using CSS

    #av-burger-menu-ul > li:nth-child(n+8){
      display: none;
    }

    and hiding them, but it is putting a band-aid on a wound.

    PS I’m running this site locally, so can’t provide a link, but as said above, it’s default Enfold behavior which is easily simulated by configuring WPML to have the switcher in the main menu.

    Thank you in advance

    S

    • This topic was modified 7 years, 4 months ago by Spiv.
    #828561

    Hey Spiv,

    Please, can`t you send the site to a temporary server and provide to us the link and WP credentials?

    Best regards,
    John Torvik

    #828921

    I’ll do so when time is due, but as I said it’s easily reproduced by adding WPML translation to the main menu. Enfold standard gives a double language navigation.

    Greets

    S

    #830878

    Hi,

    Thank you for the info. Please try the following filter in the functions.php file.

    
    add_action('after_setup_theme','avia_remove_main_menu_flags');
    function avia_remove_main_menu_flags(){
            remove_filter( 'wp_nav_menu_items', 'avia_append_lang_flags', 9998, 2 );
            remove_filter( 'avf_fallback_menu_items', 'avia_append_lang_flags', 9998, 2 );
            remove_action( 'avia_meta_header', 'avia_wpml_language_switch', 10);
    }

    This is going to disable the theme’s language switcher configuration.

    Best regards,
    Ismael

    #831095

    Thank you! Works like a charm.

    S

    #831154

    Hi! We’re glad that Ismael was able to help you! We’ll close this topic now. For any other questions or issues, feel free to post them here on the forum and we will do our best to assist you.

    For your information, you can also take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/

    We’d also appreciate it if you can take a moment to review our theme if you haven’t already. https://themeforest.net/downloads

    Thank you for using Enfold.
    Cheers!
    Sarah

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘WPML navigation issues’ is closed to new replies.