Problem:
One Post Type has 2 kind of repeatable Fields assigned.
You want to display the First repeating instance of Field A along line with the first repeating instance of Field B
(etc)
An example can be wpcf-name and wpcf-phone
Solution:
1. You set up 2 Repeatable Fields, "phone" and "name"
2. Pay attention that each item has a pendant, means, when you add a Phone go ahead and add a Name as well.
3. Once you populated this data, create a View and query the Post type in question.
4. In the Loop, use the Wizard to create a Table and use the below approach to insert your above created Fields:
<!-- wpv-loop-start --> <table width="100%"> <tbody class="wpv-loop js-wpv-loop"> <wpv-loop> <tr> <td>[types field="name" separator="<br>"][/types]</td> <td>[types field="phone" separator="<br>"][/types]</td> </tr> </wpv-loop> </tbody> </table> <!-- wpv-loop-end -->
5. Note the separator, it's a HTML break
<br>
to bring each instance of the same field on a new line.
You can also use or-each ShortCode and Item ShortCode.
Relevant Documentation:
https://toolset.com/documentation/user-guides/repeating-fields/#Displaying%20Repeating%20Fields
https://toolset.com/documentation/views-shortcodes/#wpv-for-each
https://toolset.com/documentation/views-shortcodes/#wpv-item
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 |
---|---|---|---|---|---|---|
- | - | 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 3 replies, has 3 voices.
Last updated by PiotrO586 8 years, 2 months ago.
Assisted by: Beda.