reset jetpack infinite scroll

I have several buttons on my wordpress page to easily filter the sort of post, I have 6 different types.

I have a “all posts” button and these 6 other types. (18 posts in total)

Read More

I’m trying to clean out infinite scroll and fill it with the specific type.

The way infinite scroll works is that it glues the next page under your current page to extend it.

so, type A had 6 posts in total. When I press the type A filter I want to replace the infinite scroll (containing all 18 posts) with my new collection of posts. When I show 5 posts per page (meaning that post #6 would be on page it) it doesn’t get posted. Infinite scroll loads page 2, regardless of its content. Post #6 is lost, because the infinite scroll is still loaded with the old collection

does anyone know how to replace the post queue of infinite scroll, or maybe reset it to empty and fill it again with a new collection of posts?

Related posts

Leave a Reply