-
AuthorPosts
-
January 9, 2019 at 3:42 pm #1051853
Hi awesome Enfold team!
Will copy paste to save time chat with WPML:
https://wpml.org/forums/topic/enfold-disable-remove-language-switcher-flag-leave-just-text//////////////
I am trying to: Have no flag images in my language switcher, currently it fetches an empty image, could not find the place in code where to remove images from language switcher and just leave language text (ET, EN, RU, FI)
Link to a page where the issue can be seen: https://truman.ee – but currently the flags are display: none; please check screenshot
I expected to see: I expect to see just EN, FI, RU, ET in the language switcher and have absolutely no language switcher flag images.
Instead, I got: Instead I got EN, FI, RU, ET but also with an empty image look.
/////////January 9, 2019 at 3:43 pm #1051856Screenshot:
https://ibb.co/zQSpZxYCurrently I’ve via custom css set display: none so clients don’t see it.
January 11, 2019 at 4:00 pm #1052776Hi,
Will try to simplify my request, it’s actually very straightforward.
Screenshot: https://ibb.co/8j86Wcp
1. In the screenshot you see in HTML it’s fetching an image RU.png
2. I need to stop the theme from fetching ANY images just leave the ET / RU ….
3. Where do I do that please help :)KIrill
January 12, 2019 at 1:53 pm #1053060January 12, 2019 at 9:55 pm #1053234Hi,
1. I cannot copy code from image file, please post code as text.
2. Can you please point me what code block add image, I can’t find it?
3. Or can somebody log in and do that quickly?Kirill
January 14, 2019 at 1:38 pm #1053670Hi kirillko,
Here is the code you can put in your funtions.php
/* * styleswitcher for the avia framework */ if(!function_exists('avia_wpml_language_switch')) { add_action( 'avia_meta_header', 'avia_wpml_language_switch', 10); add_action( 'ava_main_header_sidebar', 'avia_wpml_language_switch', 10); function avia_wpml_language_switch() { global $sitepress, $avia_config; if(empty($avia_config['wpml_language_menu_position'])) $avia_config['wpml_language_menu_position'] = apply_filters('avf_wpml_language_switcher_position', 'sub_menu'); if($avia_config['wpml_language_menu_position'] != 'sub_menu') return; // icl_get_languages deprecated since 3.2 $languages = function_exists( 'wpml_get_active_languages_filter' ) ? wpml_get_active_languages_filter( '', 'skip_missing=0&orderby=custom' ) : icl_get_languages( 'skip_missing=0&orderby=custom' ); $output = ""; if(is_array($languages)) { $output .= "<ul class='avia_wpml_language_switch avia_wpml_language_switch_extra'>"; foreach($languages as $lang) { $currentlang = (ICL_LANGUAGE_CODE == $lang['language_code']) ? 'avia_current_lang' : ''; if(!avia_is_overview() && (is_home() || is_front_page())) $lang['url'] = $sitepress->language_url($lang['language_code']); $output .= "<li class='language_".$lang['language_code']." $currentlang'><a href='".$lang['url']."'>"; $output .= " <span class='language_native'>".$lang['native_name']."</span>"; $output .= " <span class='language_translated'>".$lang['translated_name']."</span>"; $output .= " <span class='language_code'>".$lang['language_code']."</span>"; $output .= "</a></li>"; } $output .= "</ul>"; } echo $output; } }
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 14, 2019 at 2:02 pm #1053680Hi,
1. I copied this code to functions.php and nothing happened.
2. Any other easy option to remove the flag image from code?
3. Feels we are running in circles ;( let’s solve it and forget about it.Kirill
January 14, 2019 at 7:30 pm #1053818Hi Kirill,
You put it in the wrong place, I moved it. Please enable the switcher and check.
And flush the cache of course.
Best regards,
VictoriaJanuary 14, 2019 at 7:54 pm #1053825Hi Victoria,
Super thank you, feels we are almost there ! :)
Now I can see that in HTML the language switcher is there, however both image and title text disappeared.
We need to return the ET/RU/FI/EN part.
Kirill
January 15, 2019 at 5:46 pm #1054195Hi!
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
.avia_wpml_language_switch li span.language_translated { display:block; }
If you need further assistance please let us know.
Best regards,
VictoriaJanuary 15, 2019 at 6:05 pm #1054219Hi Victoria,
Bravo, exactly as I wanted!
Enfold as usual 5 stars (already posted reviews everywhere I could) :)
Thanks!
KirillJanuary 15, 2019 at 8:36 pm #1054318Hi Kirill,
Glad we could help!
Thank you for using Enfold :)
Best regards,
Victoria- This reply was modified 5 years, 11 months ago by Victoria.
May 30, 2019 at 7:59 pm #1105490HI,
I followed the instructions above, but I still can’t see the change of language in the top bar, I see it in the html code.
Moreover, now the language change is on the left, I would like it right next to the social networks.
Thank you for your support.June 1, 2019 at 2:25 pm #1106089Hi famarinu,
Please start a separate thread, describe your issue there and give us a link to your website to avoid confusion.
Best regards,
VictoriaJune 1, 2019 at 3:18 pm #1106098ok, the new one is here: https://kriesi.at/support/topic/change-flags-to-letters-in-language-switch-wpml/
June 2, 2019 at 6:58 pm #1106418Hi famarinu,
Thank you. I am closing this one as we continue our discussion in the new thread.
Best regards,
Victoria -
AuthorPosts
- The topic ‘Enfold Disable / Remove language switcher flag, leave just text.’ is closed to new replies.