TransWikia.com

Flickity slider on WordPress: Modify behaviour

WordPress Development Asked by vicdilu on December 11, 2020

I am using Flatsome theme wich includes Flickity slider in his UX builder.

I have set the slider with auto slide (autoPlay: true) and infinite off (wrapAround: false), but it does not stop at the last slide as expected.

I have found this issue in github: https://github.com/metafizzy/flickity/issues/612, but I don’t know how I could implement this in the theme or in the website.

Is there a way to modify flickity behaviour once it is initialized?

I can add some jQuery at the end of the page, but I have not enough knowledge. I have tried different jquery snippets with no result.

Any help would be appreciated.

One Answer

It sounds like you're choosing the slider options from theme settings on the back end, and they're not functioning the way you expect, is that correct?

The issue in Github appears to be resolved, just looking at the codepen that was included in the issue, but they may not have updated the script in your version of Flatsome. Unlikely, but a possibility.

Modifying the code manually is tricky unless you know how the function is being called, which you'll need to snoop through the theme to find how Flickity is being integrated. Once you know how it's being called, you may be able to use this technique in order to modify the options on the carousel you're creating.

If you are able to modify the carousel's settings, you'll need update the Flickity options to the settings that you'd like.

Good luck!

Answered by Pixelsmith on December 11, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP