I am trying to make a custom AJAX lazy load, load more posts system on scroll but not able to make it. As I am working on my custom WordPress theme, it is hard for me to make lazy load while keeping minimal coding and javascript to ensure lightweight theme. Can someone please help me or get a custom AJAX lazy load for my custom theme? Please.

  • I'd probably start with an existing implementation that works and cut out complexity where you think you can get away with it. I can't imagine the existing ones are too bad? – Rup Dec 27 '19 at 1:37
  • But if you are going to write a new one from scratch you're going to have to be more specific about what you need help with. The JavaScript code to detect that you need to load more posts? The actual AJAX call to the server? The endpoint you're calling - are you going to fetch the post from WP-REST and template it in the client or render a partial view on the server and load HTML? And finally the script to add it to the page in the client? – Rup Dec 27 '19 at 1:39

Your Answer

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

Browse other questions tagged or ask your own question.