Home Forums QuickStep Incompatibility with Polylang

This topic contains 13 replies, has 3 voices, and was last updated by  Joshua 7 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #28609

    mazeika
    Participant

    Hi,

    I am using Polylang plugin to create a multilingual site. There seems to an incompatibility with the Quickstep theme.

    The site is in 2 languages: Lithuanian (default) and English. Both should have a language switcher (WordPress menu item) in the top right. Both do. However:

    When in default language (lithuanian) I try to switch to English by clicking on the flag in the top right corner, it triggers the sliding effect and the page scrolls down to a blank area.

    The same does NOT happen when doing the opposite – switching from English to Lithuanian. All works perfectly then.

    Could you please have a look? The URL is http://zofija.lt and http://zofija.lt/en/

    #33646

    Joshua
    Keymaster

    This issue is happening because the plugin is adding the language switcher directly to the menu (where QuickStep automatically tries to grab links and slide to them).

    To fix this you could add the ‘separate’ class to the menu item as covered in the documentation if you have access to this menu item in Appearance -> Menus. If the plugin automatically adds it and you don’t have access you could try doing it through Javascript by adding the following to your Custom Javascript in theme options:

    jQuery(document).ready(function($) {
    $("a.lang-item").each(function() {
    $(this).addClass("separate");
    });
    });

    #33712

    mazeika
    Participant

    Hi, added this, but it doesn’t seem to help. Could you have a look?

    #33721

    Joshua
    Keymaster

    It seems like the code is working but might be triggered too late. Try this instead:

    In js/customjs.php around line 373 change this line:

    jQuery('#nav a[href^="< ?php echo $home_url[0]; ?>"]:not(.separate)').click(function (e) {

    To this:

    jQuery('#nav a[href^="< ?php echo $home_url[0]; ?>"]:not(.separate, .lang-item)').click(function (e) {

    #33811

    mazeika
    Participant

    Tried that as well. Doesn’t seem to work either.

    #33815

    Joshua
    Keymaster

    There was a problem in the above code I gave you. I’ve modified it, please try adding again and let me know if it works or not. If it doesn’t let me look at it when it’s on your page so I can see what’s going on.

    #33817

    mazeika
    Participant

    Nope, doesn’t seem to work either. It’s on the page. http://zofija.lt

    #33822

    Joshua
    Keymaster

    Still not seeing it added in. Are you sure you’re doing this in the right place?

    #34341

    mazeika
    Participant

    Brilliant! it works now. many thanks for your help.

    #46529

    cerisecharlet
    Participant

    Hello There,

    I have exactly the same issue with Wpglobus and with the theme Quickstep. I tried exactly what you recommend but it doesn’t seem to work on mine : http://www.lejeudebattoir.fr/

    I have one more issue, it doesn’t seem to translate properly the titles show in both languages as you can see

    Thanks very much in advance

    #46530

    Joshua
    Keymaster

    For WPGLobus you’d need to replace .lang-item with .wpglobus-selector-link in the above code for the menu link to work.

    As for the other issues, you should open your own ticket since they’re unrelated to avoid hi-jacking this thread’s topic.

    #46532

    cerisecharlet
    Participant

    Thanks so much Joshua !

    It is perfect ! It works, but weirdly it chnages the behaviour on my portfolio images ? They open on a black backgroud with no arrow to go next, and no closing button ?

    #46533

    cerisecharlet
    Participant

    And now when i click on the top menu, it opens the page separately instead of just going to the one page aera ? I don’t know if i am clear ?

    #46535

    Joshua
    Keymaster

    It looks like the text editor you used created special characters when you copy and pasted the above. The PHP is now being output as text incorrectly and creating a Javascript error on your site.

    You may want to try editing in notepad or other simple text editor to avoid creating special characters.

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.