Home Forums Backend Issues (wp-admin) Post Object Loop with Infinite Scroll Reply To: Post Object Loop with Infinite Scroll

  • My understanding of infinite scrolling is that you show a certain number of something. Then when the person viewing your page scrolls down near the last on then you use AJAX to get more results and insert them into the page.

    Since what you’re showing are not posts, but related posts from a post object field I think that you’re going to be mostly on your own.

    • You’ll need to create or find code that detects when the user has scrolled down to a certain point
    • then you’ll need to create the JavaScript that makes the AJAX request
    • then create the server side PHP function to get the next set of results and return them
    • and finally insert the new results into the page

    I’d start here: