Saltar navegación

[Resuelto] [wpv-loop-index] reverse

This support ticket is created hace 4 años, 1 mes. 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)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Shane hace 4 años, 1 mes.

Asistido por: Shane.

Autor
Mensajes
#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
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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