Skip Navigation

[Resolved] shortcode for Repeatable Group

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by julesW 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#2004543
2021-03-29_repeatable-group.png

Hello

I'm new to Toolset and am still learning how everything works.

I'm trying to display (with shortcode) data from a repeatable group custom field for the current post being displayed

Below is what I think should work, but does not, after reading https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153482

    [wpv-for-each field="dog-health-clr"]

  1. [types field="health-test"][/types] - [types field="test-results"][/types]
  2. [/wpv-for-each]

Attached is a screenshot of the custom field.

Can someone get me headed in the right direction?

Thank you!
Jules

#2004555

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jules,

The code that you've provided is for repeatable fields and not repeatable field groups.

To display repeatable field groups you will need to create a view. Please follow the instructions in the link below in order to display your repeating fields.

https://toolset.com/course-lesson/creating-and-displaying-repeatable-field-groups/

Thanks,
Shane

#2004597
2021-03-29_repeatable-group_health-clearances-view.png
2021-03-29_repeatable-group_health-clearances-in-example-post.png

Hi Shane

Thank you for the resource link. That was helpful.

I've created a "Health Clearances View" view.
Toolset Shortcodes provided the shortcode [wpv-view name="health-clearances-view"]
When I use that shortcode I'm not seeing any results.

I attached a couple more screenshots hoping that you can see what it is I'm doing incorrectly.

Thank you for your time.
Jules

#2005327

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Jules,

Thank you for the update and the screenshots.

From what I can see you haven't added any content to the health-clearances-view. In your screenshot you can see the Add Block button.

You will need to click on this and add the appropriate blocks that you want to use to display content from your repeatable field group.

In your case I would recommend adding the Single Field block to your view and configuring it to display the correct custom field from your repeatable field group.

Please let me know if this helps.
Thanks,
Shane

#2005899

My issue is resolved now. Thank you for pointing me in the right direction!