Skip Navigation

[Resolved] [wpv-loop-index] reverse

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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 3 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2052063
1975735-episodes.png

I have a list of posts in view and I am using [wpv-loop-index] shortcode (to serve as an episode number) see attached.

This works great but I've just realised I actually need it to run the other way. So instead of 1,2,3 it should be 3,2,1 is that possible?

The use case is that these are episodes in a series where the most recent episode will be posted at the top of the view but of course, the most recent episode won't be episode 1 it will be whatever a number of episodes have already been posted!

Thanks!

#2052367

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Stewart,

Thank you for getting in touch.
Based on our documentation on this shortcode below.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-loop-index

It won't be possible to have the count in reverse order. You will need write some form of custom code in order to achieve this.

Thanks,
Shane