Infinite Scroll in Roots

I’m trying to add in the infinite scroll plugin but I’m not having any luck.

Any suggestion on what I may be missing or experience on setting this up with Roots?

No reason I know of that this shouldn’t work… did you configure the plugin’s settings? Turn on the plugin’s debug mode then check your console.

Your options will need to look something like this:

  • Content Selector: .main
  • Navigation Selector: .post-nav
  • Next Selector: .post-nav .previous a
  • Item Selector: .post
1 Like

Thanks. I applied those settings and it’s still not working.

Console puts out this: event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

I don’t know if that’s related though.

It’s shouldn’t be related and will be fixed with the next release of jQuery.

The plugin author hasn’t confirmed compatibility for 3.6 or 3.7 yet; have you had success with a different theme or posted on the plugin’s support page?

@Foxaii I haven’t posted in their forms, but I will do that next.

Check your settings, and verify against your site’s markup. I just tested on a clean install and it works as expected with the config options I posted above. Also make sure you have more posts on the site than are shown on a single page (Settings->reading), and that your “previous posts” link is present and works.