• Hello everybody,

    I have a divi page with polylang. On desktop version all good. On mobile version there only is the hamburger menu. But we would like to have the language switcher AND the hamburger menu.

    So the question is: How can we display langswitcher in mobile view next to hamburger?

    Thank you very much for any help.
    Jens

    • This topic was modified 4 years, 10 months ago by chs87.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, you could create maybe a mobile menu using the DIVI menu component, otherwise I guess you have to modify your page template and include pll_switcher()

    Any solutions so far?
    I have the exact same problem.
    Jens…you solved this yet?
    Pll_switcher() how to do this…?
    Thank you in advance
    Erik

    Thread Starter chs87

    (@chs87)

    Hi! I got a solution for you.

    Please go to your WordPress Dashboard > Divi > Theme Options > Integration > Add code to the < head > and add the following:
    <script>
    jQuery( document ).ready(function() {
    setTimeout(() => {
    jQuery(‘#mobile_menu .pll-parent-menu-item’).wrapAll(‘<div class=”mobile-lang-switcher”>

      </div>’);
      jQuery(‘.mobile-lang-switcher’).appendTo(‘#main-header .container’);
      },1000);
      });
      </script>

      And then please go to your WordPress Dashboard > Divi > Theme Options > Custom CSS and add the following:

      @media only screen and (min-width:981px){
      .mobile-lang-switcher {
      display:none;
      }
      }
      @media only screen and (max-width:980px){
      .mobile-lang-switcher{
      position:absolute;
      right:50px;
      top:15px;
      }
      }

    Viewing 3 replies - 1 through 3 (of 3 total)
    • The topic ‘How to show language switcher on mobile?’ is closed to new replies.