JSON Infinite Scroll Load More (stuck with online tutorial)

Hi Everyone,

Please could you take a moment to explain where I am going wrong?
I’m trying to set up a load more button on my website and have been following this tutorial:

I’ve set the initial amount in the feed to 3, and I am getting those returned, but when I click on the Load More button, nothing happens.

I saved my pagination processor in the files section of modx rather than as a resource, (resources was putting forced <p> tags around it) - is this the correct method?

This is my code in the page:

This is the blog feed page I am working on: https://timothymartens.uk/feedtest/

I think the issue is that my load more button is not calling the pagination processor, but also I cannot work out how the load more button will disappear once there are no more results, but one step at a time - at the moment I would just really appreciate some help to get the next 3 results to load.

I’ve tried to use aspects from the site to get it working, but I think William has updated his site quite a bit since writing this article. Any tips would be much appreciated!

It looks like your code is missing from the post, be sure to wrap it in triple ` quotes to ensure it’s treated as a proper code block.

If the pagination processor uses a snippet, that probably does not get executed when you’ve placed it in a file.

To stop the <p> tags, disable the richtext editor for that resource by going to its settings tab and unchecking richtext.

Hi markh , Thanks very much for showing me how to disable the rich text editor. That was actually all that was needed to get it working.
Thanks Again!

1 Like