I am currently building an archive page that initially loads 9 posts and then on a press of a button (“Load more”) it will load 9 more posts and so on.
I am using the “usePostTypeInfiniteScroll” for doing it, but I encounter the following issues:
- The first 9 posts are loaded correctly and they work as expected, but every time I press Load More, it only loads 1 post, not 9 (yes, I have more than 10 posts).
- The Archive page also shows up in the Posts list (how can I remove it?)
- Sometimes when I load a few posts and I scroll up or down, the page goes to one of the Posts Pages. How can this be fixed?
Gist containing my component code: Infinite Load Hooks - UsePostTypeInfiniteScroll · GitHub