Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1331567
    khorigin
    Participant

    Hi there,

    I’m installing the X Theme with WPML and as far as I noticed, the Language Switcher works well on the Desktop Menu (i.e. when clicking the current language, it toggle opens the other available languages). However, when on mobile menu, clicking anywhere on the current language other than on the toggle image will immediately refresh the current page. I’m wondering how to change the default behavior so that it will toggle all the other available languages as well (after all, there’s no use on clicking the link to the same page again)? Thank you!

    Cheers!

    #1331568
    khorigin
    Participant
    This reply has been marked as private.
    #1331598
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> Global CSS :

    .x-sub-toggle {
        width: 100%;
        text-align: right;
        margin-right: 12px !IMPORTANT;
    }

    Hope that helps.

    #1337941
    khorigin
    Participant

    Thanks Christopher, that works. One more question, in the desktop version of the website, once the Translation Toggle is Clicked (which brings the other language options), the Main Translation Menu Selection becomes active (it doesn’t toggle close but rather refresh the page). I’m wondering if it’s possible to set it just to toggle close since it has the potential of messing up the analytics. Thank you.

    #1337963
    Lely
    Moderator

    Hi There,

    Please try adding the following code on Appearance > Customize > Custom > Edit Global Javascript:

    
    var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ? true : false;
    
    jQuery(document).ready(function($){
        if(!isMobile) {
      $('#menu-item-wpml-ls-home-menu-onepage-id>a').click(function(e) {
        e.preventDefault();
      });
        }
    });

    Hope this helps.

    #1337976
    khorigin
    Participant

    Hi Lely,

    I tried that but it still refreshes the page.

    If I click on the “English” menu once, the other languages will show up (this is normal). However, if I click on the “English” menu once more (expecting for the submenu to the other languages to be closed), the page instead goes on refresh (it links to itself). I’m wondering how to force the closing of the submenu if the primary language if clicked again when the submenu is open. Thank you!

    Cheers!

    #1338013
    Paul R
    Moderator

    Hi,

    Please change the link for English from http://www.example.com/ to #

    Hope that helps.

    #1338079
    khorigin
    Participant
    This reply has been marked as private.
    #1338171
    Paul R
    Moderator

    Hi Kevin,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1338187
    khorigin
    Participant
    This reply has been marked as private.
    #1338788
    Rad
    Moderator

    Hi there,

    It’s different URL now.

    The language loads the corresponding language, it doesn’t scroll. The sub-menu is hidden by default when the page loads, not sure why it needs the expand/collapse functionality upon click.

    And all submenu are triggered by hover in desktop.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1331567 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>