This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by ryanW-5 5 years, 7 months ago.

Assigned support staff: Robert.

Author Posts
December 10, 2014 at 6:43 am #525946


hi, I am having this duplicate flags showing on my menu, how do I remove it? (how do I control it?) I only need the drop-down language selector.

ps. I didn't do any modification on any php code.

hidden link


December 10, 2014 at 7:34 am #525969


Hey Ryan,

It's likely that one of the menus is being placed there by a setting in your theme options. Can you check those settings again? Could you also check to see if WPML > Languages > Language Switcher options > Language switcher in the WP Menu is enabled?


December 10, 2014 at 8:28 am #526005


hi Robert

thanks for rapid reply 🙂

I checked my theme options, secondary menu is turned off, I am using Enfold as my theme. When I turn it on, the Flags will be moved to the secondary menu, but it follows the main menu when the secondary menu is off.

The Language switcher in the WP Menu is enabled.

December 10, 2014 at 9:22 am #526046


1) You can use this code to remove the default theme flags completely – insert it into the functions.php file:

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);

The WPML plugin should add the language dropdown to the menu if you tick the “Display the language switcher in the WP Menu” option and select the main menu (or secondary menu) in the dropdown