Skip Navigation

[Resuelto] Incremental row numbers in Views

This support ticket is created hace 11 años. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)


This topic contains 6 respuestas, has 5 mensajes.

Last updated by masino.sinaga hace 11 años.

Assisted by: Caridad.


Dear support!

I'm wondering if it is possible to insert incremental row numbers to the table generated by the View, so that line numbers be 1, 2, 3 ... Something that would work like an auto-increment field?

Thank you in advance


Dear Kirill,

Add these lines to functions.php in your theme folder:

add_shortcode('incrementor', 'incrementor');
function incrementor() {
static $i = 1;
return $i ++;

Then define your View template as:

<li class="container[incrementor]"> <li>

Please let me know if there is anything else that I can assist you with.



Thank you Caridad!
Never have thought I can do it this way, than you for the suggestion.


I am trying this out but its not working


[wpv-if i="[incrementor]l" evaluate="$i == 1"]
Design Template 1

[wpv-if i="[incrementor]l" evaluate="$i > 1"]
Design Template 2


How do i do this correctly? I have already included the shortcode function in my function


Hi Roville,

I try to make exactly the same thing of you.... without success for now.

Do you find a solution or maybe ideas to test with you ?

Thanks in advance,


Hi again, it's ok for me now.

Adriano give me another solution here

So I see that with a shorcode with attribute (we take each field with attribute) it's could be possible to make that you want Roville. It's complex but seems possible !



Thank you, Caridad! I've just found out this solution from your answer above.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.