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

    I want to show a drop down of flags/languages for WPML but get a row of flags
    I have tried reading stuff here and I have tried various bits of code in functions.php but i either have horizontal flags or no switcher.. please can someone explain a solution.. clearly

    #320284

    Hi goossep!

    Please use this on functions.php to remove the theme’s WPML flag options:

    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', 20, 2 );
            remove_filter( 'avf_fallback_menu_items', 'avia_append_lang_flags', 20, 2 );
            remove_action( 'avia_meta_header', 'avia_wpml_language_switch', 10);
    }

    Go to WPML then the Display the language switcher in the WP Menu. Select your main or secondary menu. On Language switcher style, choose the Drop-down menu.

    Regards,
    Ismael

    #320418

    Thank you I have done what you said

    this is the bottom of my functions.php file..

    /*
    * register custom functions that are not related to the framework but necessary for the theme to run
    */

    require_once( ‘functions-enfold.php’);
    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’, 20, 2 );
    remove_filter( ‘avf_fallback_menu_items’, ‘avia_append_lang_flags’, 20, 2 );
    remove_action( ‘avia_meta_header’, ‘avia_wpml_language_switch’, 10);
    }

    This is what my top menu looks like..
    http://prntscr.com/4nm93v

    and this is what my WPML settings look like..
    http://prntscr.com/4nm9dp
    Can you please advise? why I have no flag drop down switcher?

    #321022

    Hi!

    Thank you for the info.

    Can you please post the login credentials here? Set it as a private reply. We would like to check it.

    Cheers!
    Ismael

    #321066
    This reply has been marked as private.
    #322236

    Hi!

    It works now. I just had to activate the language dropdown ( WPML > Languages).

    Regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.