Skip Navigation

[Waiting for user confirmation] Custom Pagination View Not Looping Content Correctly on Pagination Click

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 11 replies, has 1 voice.

Last updated by Minesh 16 hours, 37 minutes ago.

Assisted by: Minesh.

Author
Posts
#2812856
design-mockup.png
view-page1.png
view-page2-clickingNext.png

Tell us what you are trying to do?
I created a custom slider for products with a Toolset view. I am needing to use views as I am using divi builder and not able to use blocks to create this loop. I have not got the category switching built into the view yet, but currently I am just focusing on post type itself and not trying to filter by categories.

In this view I added the pagination controls with Previous and Next to the slider as well as the pagination navigation controls with dots. I am noticing that if I use the Previous and Next buttons it will move to the next page, but then if I click it again it will not loop back to the beginning. It will only rotate the last product.

If I use the dots to click back to the first page it will display the first 3 products again.

Is there a similar example that we can see?
I have attached the design I am trying to achieve and a screenshot of what is happened.

What is the link to your site?
Here is the link. Its under the "Best Sellers" section of this page.
hidden link

#2812934

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

So, that is how it works. If you want to move to the first record, you will have to add first and last pagination links with previous and next pagination link.

#2812963

I did add the pagination links for previous and next. The blue rectangles on the sides are the next and previous buttons. Once I click on the pagination previous or next, it doesn't loop correctly. It just loops back to the last page. If I click on the dots instead it will loop correctly.

#2813097

Can someone circle back to this request? I am still having issues and I am unsure what is causing the problem in the view.

#2813102

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I understand but with pagination there is no circular transition effect possible.

I'm not sure if you have a same situation as mentioned with the following ticket and there is a workaround shared:
=> https://toolset.com/forums/topic/split-how-to-stop-pagination-controls-from-scrolling-with-the-results/#post-1648521
=> https://toolset.com/forums/topic/the-pagination-block-should-not-fade-or-slide-with-the-main-section/

if not, there there is no solution to circle back to first item when you click on the last item.

#2813109

But the issue also is that my view won't even let me click on the Previous button to go back. If I hit next it advances, but if I try to click previous it simply loads the last result again. What is the point of a previous button if it won't go back?

#2813174

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - If I'm not mistaken, the once you click on next button, you can use the previous button to move to prevous item. What if you click on next button first and then do you see previous button is working?

#2813204
Screenshot 2025-06-19 at 8.56.24 AM.png

No. Currently if I try to click the next button with my view it will advance to the next item, but then if I try to use the previous button, it just loops back to the last item again. The only way I can get it to go back to the original first screen is if I click on the pagination dots. This is what I am trying to explain/resolve. Why are the previous and next buttons not correctly advancing or going back to the correct items.

Investigating further, I opened console and can see that the previous button and next button have the same href. Is there something wrong with the view in creating the links?

Please let me know if you are unable to view via the link I shared above.

#2813292

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share problem URL and admin access details and where you added the pagination with what part of your post/page and let me review what's going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2813640

Is there a status update on this issue?

#2813848

Went back in today and it appears that it was modified today. Unsure what was changed, but it appears to be workings now. Please let me know what was wrong to avoid the issues in the future.

#2813888

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for headsup. By mistake I posted the following reply on another ticket.

Here is the solution.

When you have a view is set to update paginated results using AJAX that is, when you select the options:
- Pagination enabled with manual transition and AJAX
- Pagination enabled with automatic AJAX transition

The view will only update the content placed between the "[wpv-layout-start]" and "[wpv-layout-end]" tag.

For this reason, if the pagination's code is placed outside those tags, they don't update correctly with each AJAX execution.

To overcome this limitation, I've moved the following pagination shortcodes within the "Loop Editor" section of the following view just before the "[wpv-layout-end]" tag.
=> hidden link

<ul class="pagination custom-pagination">
    <li class="page-item arrow-prev">[wpv-pager-prev-page force="true"][wpml-string context="wpv-views"]<i class="et-pb-arrow-prev"></i>[/wpml-string][/wpv-pager-prev-page]</li>
    <li class="page-item arrow-next">[wpv-pager-next-page force="true"][wpml-string context="wpv-views"]<i class="et-pb-arrow-next"></i>[/wpml-string][/wpv-pager-next-page]</li>
</ul>

Can you please confirm now the pagination previous/next links works as expected.