WPML language switcher in mobile fixed header

This topic has 4 replies, 2 voices, and was last updated 6 years, 2 months ago ago by Rose Tyler

  • Avatar: BWA2
    BWA2
    Participant
    January 24, 2018 at 13:59

    Hi,
    I managed to add the WPML language switcher to the mobile menu by adding this to simple.php header file:
    do_action(‘wpml_add_language_selector’);

    However, how can I add this code to the fixed header? I couldn’t find the file to edit the fixed header.

    See here: http://quirktools.com/screenfly/#u=http%3A//food.bangkokwebagency.co.th&w=375&h=667&a=37&s=1

    Can you please point me in the right direction?

    Thank you!

    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 24, 2018 at 14:36

    Hello,

    You need to make changes in etheme.js and etheme.min.js files.
    xstore/js/etheme.js http://prntscr.com/i4x42g here add code like on next screen http://prntscr.com/i4x4lz
    var menu_switcher = header.find('.mobile-language-switcher').html();
    <div class="mobile-language-switcher">'+menu_switcher+'</div>
    then minify content of etheme.js file https://jscompress.com/ into etheme.min.js file.
    Make a backup of these files, to be able to restore if something will go wrong.

    Regards

    Avatar: BWA2
    BWA2
    Participant
    January 25, 2018 at 03:58

    Thanks a lot. This works very well.
    Awesome support as always!!!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 25, 2018 at 08:11

    Hello,

    My pleasure 🙂
    Have a nice day.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘WPML language switcher in mobile fixed header’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.