• Resolved medcourse

    (@medcourse)


    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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author stepasyuk

    (@stepasyuk)

    Hi @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 to get correct filtered/sorting results from your site.

    • This reply was modified 3 years, 5 months ago by stepasyuk.
    Thread Starter medcourse

    (@medcourse)

    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.