Title: Random sort &amp; pagination &#8211; duplication &amp; missing posts
Last modified: December 9, 2022

---

# Random sort & pagination – duplication & missing posts

 *  Resolved [medcourse](https://wordpress.org/support/users/medcourse/)
 * (@medcourse)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/random-sort-pagination-duplication-missing-posts/)
 * Hi,
 * I use filter everything for a custom post type archive, to help junior doctors
   find online courses. This currently appears in pagination format (kadence theme
   pro) but will move to infinite scroll.
 * I currently sort by random as default, as I cannot be seen to favour certain (
   3rd party) courses over others. The problem is that with pagination & infinite
   scroll, the 2nd and 3rd pages just randomise again from the whole sample of courses,
   rather than randomising everything excluding the pages which have already been
   viewed.
 * This means that posts are duplicated, with some posts missing.
 * Is there a way around this? What I want is:
 * Page 1: 12 random posts from the sample of 36
    Page 2: 12 random posts from the
   24 posts which have not yet been showed page 3: 12 random posts from the 12 posts
   which have not yet been showed.
 * If there is nothing in the works for this, I’d appreciate any direction to give
   a WordPress dev to fix this issue.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frandom-sort-pagination-duplication-missing-posts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [stepasyuk](https://wordpress.org/support/users/stepasyuk/)
 * (@stepasyuk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/random-sort-pagination-duplication-missing-posts/#post-16280886)
 * Hi [@medcourse](https://wordpress.org/support/users/medcourse/)
 * Thank you for using Filter Everything plugin.
 * You can apply your ordering to the filtered WP_Query via hook `wpc_filtered_query_end`
   that fires after filtering parameters were applied to a WP_Query. And also your
   Infinite scroll feature should use filtered page URL for example [https://medcourse.co.uk/online/course-list/?ordr=random](https://medcourse.co.uk/online/course-list/?ordr=random)
   to get correct filtered/sorting results from your site.
    -  This reply was modified 3 years, 5 months ago by [stepasyuk](https://wordpress.org/support/users/stepasyuk/).
 *  Thread Starter [medcourse](https://wordpress.org/support/users/medcourse/)
 * (@medcourse)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/random-sort-pagination-duplication-missing-posts/#post-16280996)
 * This goes way over my head but is very useful to pass to a wp dev – thank you!
   Just out of interest, how long would this take for a dev to implement (so I know
   how much to pay a freelancer)?
 * Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Random sort & pagination – duplication & missing posts’ is closed to 
new replies.

 * ![](https://ps.w.org/filter-everything/assets/icon-256x256.png?rev=3487105)
 * [Filter Everything — WordPress & WooCommerce Filters](https://wordpress.org/plugins/filter-everything/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/filter-everything/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/filter-everything/)
 * [Active Topics](https://wordpress.org/support/plugin/filter-everything/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/filter-everything/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/filter-everything/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [medcourse](https://wordpress.org/support/users/medcourse/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/random-sort-pagination-duplication-missing-posts/#post-16280996)
 * Status: resolved