Okay
  Public Ticket #1153860
Slider layers won't load on "full screen sections"
Closed

Comments

  • jenssa started the conversation

    I'm redoing my website (draft) and have set it up to have "Full Screen Sections". Ie it will auto scroll to a new "full screen" section on each scroll. The problem here is that Layer Slider doesn't detect this type of full screen scroll, so it won't "play" a slider when the next section featuring a slider loads. 

    It only shows the background of the slider (video / still image / color), but not any buttons and the layers don't start.

    It works fine if I disable "Start only in viewport", but then the whole animation would be over before I scroll there :(

    I guess it can be theme dependent, so what triggers the "start only in viewport" ? 

  • [deleted] replied

    Hey jenssa,

    Could you please show us your site or a test page where we can take a look at this behavior to see if we can find the error ?

  •   jenssa replied privately
  • [deleted] replied

    We have tested it and we can see the problem, it is caused by your theme's site layout. The issue is that this theme method (script) is only emulating the scrolling, meanwhile there is no actual scrolling on the site, just jumping between sections. Because of this, the slider does not detect that it gets to viewport, as it's only there "virtually". 

    If you have access to the code of this script, we can help you adjust it and start the slider by using the LayerSlider API.

    But in case you cannot modify this theme behavior in any way, unfortunately this cannot be corrected.

    You could also try to contact your theme author with this case, they should be able to provide additional information and hopefully a workaround as well.

  •   jenssa replied privately
  •  73
    John replied

    Hi Jenssa,

    The code get_template_part('slider') pretty much does what it sounds like: it includes a part (a block or section on the page) from your theme that is responsible for displaying a slider. This is a separate .PHP file that should contain the word 'slider' in its name. Unfortunately, since we cannot see what's in that file I cannot tell you exactly how this would work or how it can solve the problem. The exact location of where you should add it to the fullscreen.php file also depends on what that template part contains.

    I would recommend contacting the theme developer again, since it's his responsibility to provide well detailed and accurate instructions. The original problem was JavaScript-related, so I'm not sure how including an extra template part should solve that.

    Please let us know if there's anything we can help you with. We are here to help, but this code snippet is not related to LayerSlider at all and this case is out of our hands I'm afraid. The theme developer should at least explain how this solution should work.

    Thank you for understanding!

    Best Regards,
    John | Kreatura Dev Team

  • jenssa replied

    Hi John


    Ah, dang it... Okay I'll try and contact the theme dev and see if they can help sort this out.

    Thanks for the detailed answer. 

  • jenssa replied

    Hi again, this is what the theme dev replied (as I expected):

    "Please, note that on Full Screen section page template is used different script for scrolling.
    It is why it is in conflict with layer slider so, this combination is not possible  :(
    We are not able to provide you any workaround, since it will require a lot of code modification, and this is third party script we are using."

    So I guess I'm stuck in limbo here?

  •  73
    John replied

    Hello again,

    Based on what the theme author said, yes, I'm afraid so. It is by no means an impossible task, but they need to make the necesarry changes since it will likely cause similar issues to other plugins relying on page scrolling. A temporary shortcut solution could be a switch in the theme settings to disable that script or find any other compromise to at least mitigate the issue. Another way for them is just dropping the 3rd party library and code that feature on their own. I don't have a deep insight on their work, but it shouldn't be that hard or time consuming. In the meantime, using a different type of page template should help you out if I understand their words correctly.

    Best Regards,
    John | Kreatura Dev Team

  • jenssa replied

    Yeah if I just go with any other template, it works fine. Shame as I have fallen in love with this type of "1-page scrolling", but guess I have to compromise and use a different one. Or simply not use LayerSlider on my frontpage.

    Appreciate the fast and thorough replies by you lot. So thanks for trying :)

  •  73
    John replied

    Thank you for your kind words! I'm sorry we couldn't help you more, our options is very limited due to the 3rd party factor. If there's anything else, we're here if you need further assistence.

    Best Regards,
    John | Kreatura Dev Team