Skip Navigation

[Resolved] "Load More" pagination style

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 1 year, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2555219

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: hidden link

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.

#2555473

Hello,

There isn't built-in "Load more" button feature within Toolset Blocks plugin, it needs custom codes, see below test site:
hidden link

Login URL: hidden link

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:
hidden link

It works fine.