Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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….

    #1445534

    Hey limedrop,

    Maybe this will help you out? https://wpml.org/forums/topic/change-flag-icons-to-short-text/

    Best regards,
    Rikard

    #1445539

    Hehe…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?

    :)

    #1445573

    on WPML – Languages – there is in the options : “Menu language switcher ” Add a new one.
    Then you see the options for that menu you choose

    if 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

    #1445588

    ok – 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 settings

    Now 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

    DOM will look like this then:

    #1445626

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

    #1445662

    Thank 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!

    #1445838

    ok – 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);
    }
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.