Random order for looper with JSON looper provider type

I want to display 3 slides that will be randomly picked from a set of 30. I plan to store data for the 30 in a JSON object and use the JSON looper provider to pick 3 of them at a time.

How do I pick the 3 slides to be random on each load of the page? Even if I can get a random offset that will work because I do not need each slide to the random, they can be in order e.g. 4,5,6 one time and 12, 13, 14 another time.

If there is another approach for achieving the same functionality, that will work too. Thanks in advance.

Hi @amardeepmisha,

Thanks for reaching out.
It is not very clear what you are expecting here. Do you want to show the first 3 slides in random order on every load, or do you want to show the all slides in a random manner? Unfortunately, there is no such option to get any of that, but you can try by using the Custom Looper option where you can create a custom PHP function and which will return the slides in random order by fetching it from the JSON. I would suggest you go through the following article on how to create the custom looper and the threads which explain the custom loopers.



Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.