Site logo

Archived topic

Infinite scroll with Ajax Load More

7 replies · Started by Almog on July 25, 2022

Viewing posts 1–8 of 8

Hi,
I use the Ajax Load More plugin to add infinite scroll to my website. the problem is that the plugin loads also the current post.
I have asked the plugin author how to fix that, and he said:
"You’ll have to pass the post ID to the post__not_in shortcode parameter."
any idea how can I do that in generatepress?

Hi Almog,

I’m not familiar with Ajax Load more, but are you using a shortcode to query posts through that plugin? Or, are you using a different plugin to query posts?

Kindly let us know.

I am using a shortcode to query posts through that plugin

Ok, thanks
Another issue I have with the infinite scroll is that the featured image of the posts that it loads are smaller than they should be.
This depends only on the featured image, the rest of the images inside the content of the posts that are loaded from the plugin are fine. here is an example: https://midnightpets.com/are-ferrets-smarter-than-cats/ (just scroll to the bottom and it will load the next post)
any suggestion on how to fix that?

In Appearance > Customize > Layout > Blog > Featured Images > Posts, check if your media attachment size is set to full.

If it is already, may you ask the support of the plugin as well regarding this issue?

He’s not saying it’s theme related. He means that you need to alter whichever theme you’re using, specifically, the files for their plugin to work.

Are you trying to implement this in the archive?

This is the archive template file: https://github.com/tomusborne/generatepress/blob/master/archive.php

You’ll need to use a Child theme, create a new archive.php file and modify it to the specifications of the plugin.

Hope this clarifies!

This archived topic is closed to new replies.