-
AuthorPosts
-
March 25, 2015 at 4:44 pm #417894
Hi,
it is possible to make the language-switch whitout flags?
I will use only DE & EN as text.How i can change the “hight” of second Header Secondary Menu?
Thanks
CocoMarch 26, 2015 at 6:12 pm #418701Hi Coco!
Try adding this to the bottom of your functions.php file.
function new_nav_menu_items($items,$args) { if (function_exists('icl_get_languages')) { $languages = icl_get_languages('skip_missing=0'); if(1 < count($languages)){ foreach($languages as $l){ if(!$l['active']){ $items = $items.'<li class="menu-item"><a href="'.$l['url'].'">'.$l['native_name'].'</a></li>'; } } } } return $items; } add_filter( 'wp_nav_menu_items', 'new_nav_menu_items',10,2 );
Cheers!
ElliottMarch 27, 2015 at 12:17 am #418930I think you mean functions.php in “wp-includes” folder?
Sorry Elliot, but it don’t work’s :-(
I dont see a difference, both flags are there…Coco
March 27, 2015 at 1:06 am #418954Hi!
No, you should go to Appearance > Editor and add the code to Functions.php file of the theme which is located in wp-content/themes/enfold folder
Cheers!
YigitMarch 27, 2015 at 1:33 am #418982This reply has been marked as private.March 28, 2015 at 5:40 am #419726Hey!
Add this to the functions.php file to remove the 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); }
Regards,
IsmaelMarch 29, 2015 at 11:21 pm #420128Thank you, it works nice…..
But when i click English version, so appear the secondary menu over the top menu.
with both flags!?It is possible to control the color of this language-switcher (blue) independent of the menu colors?
Regards
CocoMarch 30, 2015 at 3:39 pm #420517Hey!
Please add following code to Quick CSS
li#menu-item-112 + .menu-item a,li#menu-item-160 + .menu-item a { color: blue!important; }
Regards,
YigitMarch 30, 2015 at 3:50 pm #420527Ok, thank you!
Last problem is the displaying of the secondary menu in english page version.
Regards
CocoMarch 30, 2015 at 3:52 pm #420528Hi!
Can you please elaborate? You can go to Enfold theme options and change the language and change the options for that specific language only. To activate secondary menu, please go to Enfold theme options > Header > Extra elements and choose to display it
Cheers!
YigitMarch 30, 2015 at 4:09 pm #420543OHHH :-) now i’m understand! sorry… :-) …it works!
But i have make many changes in the german version.Can i export the theme settings file of the german section an then
import this in the english section? Or is it only one file for all versions?Regards
CocoMarch 30, 2015 at 4:11 pm #420544March 30, 2015 at 4:19 pm #420558Style overwriting works!
Regards
CocoMarch 31, 2015 at 7:23 am #420968March 31, 2015 at 3:28 pm #421202Yes, all works fine.
Thanks for help!Coco
-
AuthorPosts
- The topic ‘WMPL whitout flags’ is closed to new replies.