Problem: I would like to set up a View that includes 9 items per row. The first item should span two rows of 4 smaller grid items. How should I set up the loop to support this structure?
Solution: Use the wrap, item and index attributes to set this up.
[wpv-layout-start] [wpv-items-found] <section id="front-section-two" class="front-section cf"> <!-- wpv-loop-start --> <wpv-loop wrap="9" pad="true"> [wpv-item index=1] <div class="section-two-column-one"> <article>Content template here</article> </div> <div class="section-two-column-two columns-wrap"> [wpv-item index=other] <article>Content template here</article> [wpv-item index=9] <article>Content template here</article> </div> [wpv-item index=pad] [wpv-item index=pad-last] </div> </wpv-loop> <!-- wpv-loop-end --> </section> [/wpv-items-found] [wpv-no-items-found] <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong> [/wpv-no-items-found] [wpv-layout-end]
Relevant Documentation:
https://toolset.com/documentation/user-guides/digging-into-view-outputs/#vmeta-wpv-loop-parameters
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 4 replies, has 2 voices.
Last updated by 5 years, 3 months ago.
Assisted by: Christian Cox.