-
AuthorPosts
-
November 17, 2014 at 5:39 am #352272
Hi Team,
I finished integrating WPML, but I want to change the flags to the dropdown menu. It automatically shows the switcher at the top left header area in flags, I want it to stay there but just the dropdown menu change. Please let me know how that can be accomplished. Thanks and much appreciated, i’m very happy with the Enfold theme.
- This topic was modified 10 years ago by digitalcrossover.
November 17, 2014 at 9:08 pm #352682Hey digitalcrossover!
Please add this on functions.php to remove the theme’s default flags:
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); }
You can then set the flags on the WPML option page (WPML > Display the language switcher in the WP Menu setting).
Regards,
PeterNovember 18, 2014 at 6:07 am #352839Thanks Peter!
The code you provided works for removing the default flags.
But I don’t see that option in WPML. The only way I can add it is the widget. Is there a way I can make it to add the dropdown menu in the same place the flags are/were, or maybe to the right just above the social icons?
Thanks!
November 18, 2014 at 12:13 pm #352913Hi Digitalcrossover,
you can set the Language dropdown to be shown in the main menu on the settings page of WPML.
Just click on ” WPML” in the left Menu on the WordPress backend and scroll down until you see “Language switcher in the WP Menu”.
Tick the “select” and choose the menu where it should show – et voila that should be it (ofcourse you have to seve ;) )
Hope this answers the question.November 19, 2014 at 5:32 am #353488Thanks for your feedback! I actually don’t see anything like that at all in the WPML options, please see screenshot below which shows what it looks like in my WordPress backend. I went through all sections and can’t seem to find anything. Would it require some custom work to insert it properly in the top header area?
November 20, 2014 at 9:34 am #354150Hi!
Did you create a menu on Appearance > Menu yet? Set the menu as Enfold Main Menu.
Cheers!
IsmaelNovember 22, 2014 at 2:41 am #355752Hi, Thanks for the suggestion! I did already set the Menu for both languages, and there’s no WPML options in there, other than specifying that 1 menu is a translation of the other.
I see in the WordPress editor there is WPML /flag code in config.php, is there a way I can edit the code so the default is the dropdown instead of the flags?
November 23, 2014 at 1:10 pm #356193Hi!
I checked your website and it seems like you’re using an old version (v2.0). Please update WPML to the latest version (I think it’s 3.8.1 or so) and you should see the options on the admin page.
Regards,
PeterDecember 6, 2014 at 8:00 am #364023This reply has been marked as private.December 8, 2014 at 11:58 pm #365051Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueDecember 9, 2014 at 6:15 am #365177December 10, 2014 at 3:07 am #365795Hey!
Please check the site now.
Best regards,
Ismael- This reply was modified 9 years, 11 months ago by Josue.
December 10, 2014 at 3:15 am #365798This reply has been marked as private.December 11, 2014 at 2:39 am #366388This reply has been marked as private.December 11, 2014 at 7:30 am #366531Hi!
Duplicate the Top Menu on Appearance > Menus panel for the french language then go to the French’s Enfold Theme Options > Header > Extra Elements > enable the Header Secondary Menu to display on the left of the top header. Go to WPML > Display the language switcher in the WP Menu , select the translated Top Menu.
Cheers!
IsmaelSeptember 13, 2016 at 10:22 am #685622Hi,
After theme Enfold update v3.8 The default flags also appear in the Main Menu!I applied a temp CSS fix on my sites for now:
LI.av-language-switch-item { display: none; }
Please advise for the below and how it can be adjusted to also hide the flags from the main menu!
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 reply was modified 8 years, 2 months ago by gstyle333.
September 14, 2016 at 8:15 am #686193Hi,
Could you post a link to the site in question so that we can take a closer look please? Next time please start a new topic since the thread you posted in is pretty old.
Thanks,
Rikard- This reply was modified 8 years, 2 months ago by Rikard.
September 14, 2016 at 2:10 pm #686359Sure, sorry about that.
http://www.positivafx.euSeptember 19, 2016 at 5:24 am #688272Hi,
Can you post an access to the site too please?
Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.