Skip Navigation

[Resolved] Duplicate entries for listings

This support ticket is created 2 years, 10 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.

This topic contains 2 replies, has 2 voices.

Last updated by omriB 2 years, 10 months ago.

Author
Posts
#2366373
Screen Shot 2022-05-19 at 10.10.48 AM (2).png
Screen Shot 2022-05-19 at 10.10.51 AM (2).png

Hi there,

On our listings page page, hidden link

We have duplicates. Not sure exactly why? could you help stop them from showing up?

I've attached a screenshot of the settings of the WordPress settings.

#2366525

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

The duplications happen because you are mixing pagination with random ordering. (It includes a warning in your screenshot that it can lead to the same items appearing in multiple pages.)

With pagination the database is queried for the first 12 results, and after paginating, the next 12 results, and again after paginating the next 12 results.

If the results are in a fixed order (e.g. ordered alphabetically) then it is predictable and consistent what the second page of results will contain (results 13-24).

But when the ordering is random every request for results is random, so logically the same results can appear multiple times. It is more obvious in your case, using infinite scroll, because the previous results still appear on the page.

If you want to continue with infinite scroll pagination and with random ordering, you could make the page size much larger (e.g. 24 or even 48 results), and then the problem would be less apparent.

#2366587

My issue is resolved now. Thank you!