The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
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?
After looking at the code, I also now remember that limit is page numbers, not posts. So 2 or 3 should be a good start.
radu5
@kasper The limit you have been implemented is using “useArchiveInfiniteScroll”, not “usePostTypeInfiniteScroll”.
I was trying to use the “usePostTypeInfiniteScroll”, in order to also have the functionality of choosing the archive source.
maniego.gio116
Hello may i add another question? is it possible to do infinite scroll without changing the url of the site? cause i have a custom home page that loads different categories.