Problem:
The user wanted to style the first element in a grid view differently.
Solution:
Use the wpv-item shortcode and its index arguments, and use a different content template. The view code will, then, be:
<wpv-loop> [wpv-item index=1] [wpv-post-body view_template="loop-item-in-test1-first-element-template"] [wpv-item index=other] [wpv-post-body view_template="loop-item-in-test1"] </wpv-loop>
Or you may use a wrapper div:
<wpv-loop> [wpv-item index=1] <div class="first"> [wpv-post-body view_template="loop-item-in-test1-first-element-template"] </div> [wpv-item index=other] <div class=""> [wpv-post-body view_template="loop-item-in-test1"] </div> </wpv-loop>
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-154400
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: Africa/Casablanca (GMT+01:00)
This topic contains 2 replies, has 2 voices.
Last updated by 4 years, 6 months ago.
Assisted by: Jamal.