Problem:
How can I produce a Lightbox for each Repeating Field (Image)?
Solution:
You must tell Views to produce the HTML for each field
This is done with the
[wpv-for-each]
ShortCode
Then you pass the RAW Image URL (link false) to the
a href
, and use whatever as your placeholder (usually the Thumbnail)
See the below example.
<div id="img-gallery"> [wpv-for-each field="wpcf-images"] <a class="thickbox" rel="gallery" href='[types field="images" raw="true" link="false"][/types]'>[types field="images" link="false" size="thumbnail"][/types]</a> [/wpv-for-each] </div>
Relevant Documentation:
https://toolset.com/documentation/user-guides/repeating-fields/
https://toolset.com/documentation/views-shortcodes/#wpv-for-each
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 |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 4 replies, has 3 voices.
Last updated by Charles 7 years, 10 months ago.
Assisted by: Beda.