Navigation überspringen

[Gelöst] Customize max results in a view when using AJAX

This support ticket is created vor 3 Jahren, 5 Monaten. There's a good chance that you are reading advice that it now obsolete.

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: Africa/Casablanca (GMT+01:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von NickC8880 vor 3 Jahren, 5 Monaten.

Assistiert von: Jamal.

Author
Artikel
#2130501

I want to modify the maximum number of results shown per page and in total for a view, and do this while using "Pagination enabled with manual transition and AJAX". I have used this documentation as a guide (https://toolset.com/forums/topic/view-newest-100/) and it works well when doing page reloads, but when using AJAX it breaks when moving beyond the first page.

Is there something that I can change in the code, or another method for achieving this? Thanks!

#2130789

Hello and thank you for contacting Toolset support.

I just tested the custom code on a test site and the solution works for AJAX too. Can I take a look at the view and the custom code that you are using? Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2130819

It turns out that the problem was with how I set up the snippet within the Code Snippets plugin that I use. I had set it to only work on the front end, but apparently (perhaps obviously, in hindsight) AJAX pagination needs admin/backend access. Once toggled, it works fine.

Sorry for the trouble! I'll be sure to test that setting for any future snippets that I create.

#2130823

Closing the ticket now