-
AuthorPosts
-
September 16, 2014 at 7:51 pm #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.. clearlySeptember 17, 2014 at 4:56 am #320284Hi 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,
IsmaelSeptember 17, 2014 at 10:50 am #320418Thank 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/4nm93vand this is what my WPML settings look like..
http://prntscr.com/4nm9dp
Can you please advise? why I have no flag drop down switcher?September 18, 2014 at 9:36 am #321022Hi!
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!
IsmaelSeptember 18, 2014 at 10:39 am #321066This reply has been marked as private.September 20, 2014 at 8:46 am #322236 -
AuthorPosts
- You must be logged in to reply to this topic.