Skip Navigation

[Resolved] Using Loop Iteration Shortcode and Pagination

This support ticket is created 3 years, 9 months ago. 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: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1930513

--- Tell us what you are trying to do?
Use the loop iteration shortcode from the Toolset Custom Code snippets and get it working with pagination with manual page reload.

--- Is there any documentation that you are following?
Referring to the article here: https://toolset.com/documentation/adding-custom-code/count-the-number-of-views-loop-iterations/

From what I can see with the documentation here this looks like it has support for pagination using the shortcodes "tssnippet-loop-iteration-force" and "tssnippet-loop-iteration-clear", but I'm unsure of where these shortcodes need to placed in order for this to work as expected.

--- Is there a similar example that we can see?

hidden link

--- What is the link to your site?

hidden link

#1930901
loop.JPG

Hello,

The [tssnippet-loop-iteration-force] shortcode can be used to deal with thepadandpad-last indexes of the View loop, which are not recorded automatically.

[tssnippet-loop-iteration-clear] shortcode should be used after the View loop is rendered.

See my screenshot: loop.JPG

More help:
https://toolset.com/documentation/adding-custom-code/count-the-number-of-views-loop-iterations/
Just below text "This snippet will automatically record the counter of iterations for all Views."