Skip Navigation

[Resolved] Generating an infinite loop

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#599640

Tell us what you are trying to do?

I have a view to show products that are showing 8 products divided into 2 pages (4 each).
I'm trying to generate an infinite loop by setting up a random order my only problem is that I cannot set an infinite pagination.

I thought that in order of function the slider should restart once it comes to the end and since the order is set as random the effect would be the one of having many products even though they are still the same.

My site: hidden link

#599797

Dear Vito,

You can not use Views pagination with random order, it will conduct some unexpected result, for example:
page 1
- post A
- post B
- post C
- post D

Views will query the database once in each pagination, if you are using random order, it might get duplicated results, for example:
page 2
- post E
- post A
- post F
- post D

So, in your case, I suggest you disable random order, and follow our document to setup the Infinite Scrolling:
https://toolset.com/documentation/user-guides/infinite-scrolling-in-views/

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.