I have a problem with my pagination. I have posts that are paginated (10 per page - i have load more button on page and it loads next 10 posts on same page etc.) and users on website can add new posts.
I had an idea to pass ID of first post and to query only posts that have ID less than this ID, but my posts are not sorted by ID and that will not work. Actually, my posts can be sorted by created_at (most relevant), by distance (i have lat and long for posts and take users current location to calculate the distance) and by most participants (users can participate to posts). That is a problem because i have to pass different start post ID or some_value so i can query only posts that comes after that one at beginning of post list.
Sorry for bad english and maybe bad explanation but you will figure out what is my problem.
Any suggestions are welcome.