• Resolved cars111

    (@cars111)


    Hi I have installed weglot and the desktop website is working well but it isnt showing on mobile. How can I get it to show the language toggle on tablet and mobile? The weglot guys said to add this <div class=? weglot_here ?></div in the source code but not sure how to access it or if it is even the best way of achieving the functionality. Thanks

Viewing 15 replies - 1 through 15 (of 21 total)
  • Theme Author oceanwp

    (@oceanwp)

    Hello, for customizations like this, it is via the premium or priority support.

    Thread Starter cars111

    (@cars111)

    Hi I a bit disappointed by your reply. I chose the Weglot plugin as you recommend it on your website. I have used Weglot on other themes and they ALL show the language toggle on mobile. I presumed if you are recommending this plugin that it would work but alas it does not. The Weglot guys have gone into my website and they have said

    ”The fact is that your theme have some CSS rules that creates conflict with the language selector.
    I change the language selector as you can see now on your website. In order for you to display it correctly in the mobile menu, you have to use the list displayer and add the text.
    Images can’t be displayed in your menu because of the CSS rules.”

    I love your theme but it does not seem I can use it from now on as language is a big part of my websites. I hope you can shed some light on the subject.

    Theme Author oceanwp

    (@oceanwp)

    In that case, it is different, it is an issue not a customization, can you send me the url of your site?
    So if I understand correctly the “<div class=? weglot_here ?></div>” need to be before the mobile menu link, is that right?

    Thread Starter cars111

    (@cars111)

    Hi thank you for the reply https://www.bladerunnermallorca.com The weglot guys have added the code but it isnt showing

    Thanks

    Theme Author oceanwp

    (@oceanwp)

    It is because you need to also add it for mobile, try this code in the functions.php of your child theme:

    function weglot_mobile() { ?>
    	<div class=? weglot_here ?></div>
    <?php
    }
    add_action( 'ocean_before_mobile_icon', 'weglot_mobile' );
    Thread Starter cars111

    (@cars111)

    Hi I have added the code to child functions and it is still not showing. Hope you can help. Thanks

    Theme Author oceanwp

    (@oceanwp)

    You have literally added “<div class=? weglot_here ?></div>” I taught “? weglot_here ?” mean to replace for weglot code, what exactly is the code to add? Because it can’t be “<div class=? weglot_here ?></div>”.

    Thread Starter cars111

    (@cars111)

    This is what Max from Weglot emailed me.

    Regarding your issue, you have to add a second button in your mobile menu using the <div class=? weglot_here ?></div> and then if the button you add in the mobile version, also appear in the desktop version, use a media quires to hide it when you are in the desktop version, using:

    @media screen and (max-width: 959px) {
    .country-selector {
    display: none!important;
    }
    }

    I remain at your disposal if you have any other question.
    Have a nice day,

    Max T.

    Thanks

    Theme Author oceanwp

    (@oceanwp)

    No need css to hide it because the mobile button is already hidden but the div is present and nothing happens, can you ask to weglot that you have added the div before the mobile link but nothing happens.

    Thread Starter cars111

    (@cars111)

    Hi here is what Max says

    Indeed, the button was already hidden but it was due to the theme you are currently using which contains CSS rules that are in conflict with the button.

    There is a way to add another button in the source code with “<div class=”weglot_here”></div>”.
    However, you’ll need to change your theme CSS rules.

    Thanks

    Theme Author oceanwp

    (@oceanwp)

    Have you tried to add this “<div class=”weglot_here”></div>”? Because the selector is not hidden, it is displayed like this on your site “<div class=? weglot_here ?></div>”.

    Thread Starter cars111

    (@cars111)

    Hi i have amended the code to <div class=”weglot_here”></div> and this <div class=weglot_here></div> still not showing on mobile

    Thanks

    Theme Author oceanwp

    (@oceanwp)

    The div is present on mobile, that means something is missing, have you contacted weglot to ask them that when the mobile menu appears on mobile view, you have added the div but the switcher doesn’t appear, show them your site, they will see that the div is present on mobile.

    Thread Starter cars111

    (@cars111)

    Hi here is Max reply
    Indeed the div is present but as I told you before nothing appears because of your theme. Some CSS rules make conflict with our button which is why it’s not displayed correctly on the menu.

    Hope you can help

    Theme Author oceanwp

    (@oceanwp)

    Hi, ok, don’t worry, we will find a solution for this ??
    I’m thinking about something, we can try to add the switcher after the navigation and before the mobile so it will be always present on your site, you will just need to remove the default switcher in the navigation. Remove the code I gave you and try this one in the functions.php file of your child theme:

    function weglot_mobile() { ?>
    	<div class=? weglot_here ?></div>
    <?php
    }
    add_action( 'ocean_after_nav', 'weglot_mobile' );

    Don’t worry if you see the switcher under the navigation, I just need to know if it work on desktop and mobile, if yes, I will give you the css code to make it good ??

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Weglot mobile menu’ is closed to new replies.