By default, everytime the infinite scroll loads some more posts, it loads 7 posts. Is there a way to load more posts than just 7 each time?


The solution was to make a custom query with a posts_per_page argument to the desired number of posts.

|improve this answer|||||
  • 1
    You don't use a custom query for that, you can just add the posts_per_page argument to the add_theme_support call. Docs here: jetpack.me/support/infinite-scroll – Otto Jul 10 '13 at 10:43
  • Wow, I read this doc about 5 times, and I never saw that. #Blind Thank you! – user25893 Jul 11 '13 at 0:37

I presume your blog is set to show at most 7 posts per page. Try going to Settings>Reading and adjust the number for posts per page, which is labeled: "Blog pages show at most"

|improve this answer|||||
  • No the inifinite loader does not load the posts according to the value that was set in Settings->Reading, unless it is set to "click", wich is not my case :/ – user25893 Jul 10 '13 at 0:49
  • Really? I was under the impression that Infinite Scroll basically works by finding the "next" link, visiting that page and scraping the posts there. If so, this would always respect the posts per page parameter since it isn't querying the DB via ajax, it is simply looking at what the next page would've been. But maybe something else is happening in Jetpack that I'm not aware of. – helgatheviking Jul 10 '13 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy