Hey guys,
I'm trying to do a simple "Load More" pagination option using the infinite scroll but it doesn't seem to work properly. This seems like a pretty normal bit of functionality when loading a list of posts.
Something like the example on this page is exactly what I'm looking for: lien caché
Not to load an entire new page of posts but to load more. Is that possible?
If this isn't possible can I link back to the top of the list after a user goes to the next page instead of just loading the new page at the bottom of the results (seems like it should do this by default).
I'm using the block view builder.
Hello,
There isn't built-in "Load more" button feature within Toolset Blocks plugin, it needs custom codes, see below test site:
lien caché
Login URL: lien caché
1) Create a post view, in section "Pagination and Sliders Settings", enable option "Pagination enabled with manual transition and AJAX"-> Infinite scrolling
2) in section "Search and Pagination", add below JS codes:
(function ($) {
$(document).ready(function () {
$('.js-wpv-layout-infinite-scrolling').removeClass('js-wpv-layout-infinite-scrolling');
});
})(jQuery);
3) in section "Loop Editor", just above shortcode [/wpv-items-found], add next page shortcode:
[wpv-pager-next-page]Load More ... [/wpv-pager-next-page]
Test it in frontend:
lien caché
It works fine.