Hi Guys,
quick question,
I have to following loop
...
<div id="container">
<wpv-loop>
<div class="flex-item">[wpv-post-body view_template="Home page categories"]</div>
</wpv-loop>
</div>
...
Is there a way of creating a dynamic class for the class=flex-item for every time it ran through the loop. Ie I would like to see a result of the following for every flexbox in the series:
class="flex-item item1"
class="flex-item item2"
class="flex-item item3"
ETC
for each of the resulting boxes in the series for the loop. The reason for this would be to to identify a specific box for css editing
Thx
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Have you looked at [wpv-item] shortcode?
For example:
...
<div id="container">
<wpv-loop>
[wpv-item index=1]
<div class="flex-item item1">[wpv-post-body view_template="Home page categories"]</div>
[wpv-item index=2]
<div class="flex-item item1">[wpv-post-body view_template="Home page categories"]</div>
[wpv-item index=3]
<div class="flex-item item1">[wpv-post-body view_template="Home page categories"]</div>
</wpv-loop>
</div>
...
More info:
https://toolset.com/documentation/views-shortcodes/#wpv-item
Does this helps/