-
AuthorPosts
-
May 24, 2024 at 1:30 pm #1445521
Hi, I know that I usually can hide the flags (and use text instead) in the Header section in Theme options.
However, now that I use the sidebar menu layout – see here: https://ostrabergen.no – the options to do anything in Theme options – Header – is now blocked, How to work around it. I only want it to say NO and EN, and not the flags….
May 24, 2024 at 2:25 pm #1445534Hey limedrop,
Maybe this will help you out? https://wpml.org/forums/topic/change-flag-icons-to-short-text/
Best regards,
RikardMay 24, 2024 at 3:03 pm #1445539Hehe…they send me back to you.
“Hi there.
Of course, I am happy to help.
The switchers that you have at the top of your site are not served by WPML directly but by the AVIA builder that comes with the Enfold theme.
I’m attaching a screenshot below so that you can see the code of that content part and you will see it is AVIA-related.
You will see multiple “avia” words in there.
I am not sure if avia builder or the enfold theme has the possibility to show the language names instead of the language flags, I would recommend that you check this with their support team here:
https://kriesi.at/support/”However, this seems like a forgotten part on your end, that the Hide the flags in Theme options – Header is unavailable with this menu layout…
Can you still help?:)
May 24, 2024 at 5:33 pm #1445573on WPML – Languages – there is in the options : “Menu language switcher ” Add a new one.
Then you see the options for that menu you chooseif the switchers are not inside a menu – you can scroll down a bit and have : “Custom language switchers” mark it and customise it there.
i do not have an enfold setting with header on the left and WPML – so i can not test it for you.
if that position does not belong to these settings:try: https://kriesi.at/support/topic/wpml-language-switcher-8/#post-695476
but: i think these filters and action hooks are deprecated now. on : class-avia-wpml.php lines 86 to 110 there are more options to influence. i think a mod should instruct you with these new “options”
or read this for more info: https://wpml.org/documentation/theme-compatibility/enfold/#enfold-language-switcher
May 24, 2024 at 6:33 pm #1445588ok – if there is no easy way. Just switch for a short moment to:
General Layout : Top Header
Go to “Header – Extra Elements and choose on Enfold WPML Language Flags (Global Setting) : hide …
Switch back to your “Left Sidebar Header”
Save the settingsNow insert this to your child-theme functions.php:
add_action('ava_main_header_sidebar', function() { echo do_shortcode("[wpml_language_selector_widget]"); });
And now style it via WPML – Languages – Custom language switchers
May 24, 2024 at 8:29 pm #1445626May 24, 2024 at 10:21 pm #1445662Thank you so much for your help! However, I ended up using a widget within every page.
A little more work, but nice result :)
[wpml_language_switcher]Also I was able like you said to remove the flags in the top by temporary switching to “normal” Top header for a minute, before switching back to Left.
Have a nice weekend!
May 25, 2024 at 7:27 am #1445838ok – thanks
maybe you decide to style it a little:
#lang_sel_list { display: inline-block !important; background-color: rgba(255,255,255,0.3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); border-radius: 5px; padding: 5px ; } #lang_sel_list > ul { display: flex !important; } #lang_sel_list .wpml-ls-item { position: relative; left: 0 !important; } #lang_sel_list .wpml-ls-link { text-decoration: none !important; } #lang_sel_list .wpml-ls-link:hover { background-color: rgba(0,0,0,0.3); }
-
AuthorPosts
- You must be logged in to reply to this topic.