Skip Navigation

[Resolved] Toolset Repeater shortcode for frontend use ONLY

This thread is resolved. Here is a description of the problem and solution.

Problem:
The issue here is that the user wants to display their repeatable field groups on the frontend.

Solution:
This can be done by following the instructions in the link below.

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

This support ticket is created 4 years 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 11 replies, has 2 voices.

Last updated by jeffG-4 4 years ago.

Assisted by: Shane.

Author
Posts
#2122563

I need a shortcode for repeater field on my site

Most that I have located talk about creating the repeater and placing it in using backend editor (which is not what I need), or PHP (ONLY last result if repeater shortcode is impossible to have on the front end)

Is there a similar example that we can see? No

What is the link to your site? hidden link. View the site with the login: staffing-web (for both username and password)

#2122649

Shane
Supporter

Languages: English (English )

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

Hi Jeff,

Thank you for getting in touch.

I'm assuming here that you are referring to displaying the values of a repeatable field on the frontend. If so then you can use the shortcode below to resolve this issue.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-153482

The [wpv-for-each] shortcode should be able to allow you to display your repeating fields.

Thanks,
Shane

#2122665

Thanks for getting back with me on the issue.

Following the document you sent, I placed in the shortcodes:

[wpv-for-each field="partner-info (repeater group name)"]
[types field='info-title'][/types]
<img src="[types field='wireframe-image' output='raw'][/types]">
[/wpv-for-each]

However after Im still having no luck with the info showing.

#2122685

Shane
Supporter

Languages: English (English )

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

Hi Jeff,

Would you mind allowing me to have admin access to the site so that I can check on this in a bit more detail for you ?

I've enabled the private fields for your next response.

Also please send me a link to the page where you are having this issue.

Thanks,
Shane

#2122699

The page im having issues with: hidden link (this is a template for our partners on the site)

#2122701

Shane
Supporter

Languages: English (English )

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

Hi Jeff,

I'm assuming here that you are trying to display the Partner Info fields.

In this case we are looking at a repeatable field group and not simply repeating fields. The methods to display these are different.

Do display the repeatable field group you will need to create a view. I checked here and noticed that you've started to create this view.
hidden link

However there are a few things that are missing. Firstly in order to display the Repeatable Field group you must select ONLY the repeatable field group post type.

This means you must only select "Partner info". The next step is to go to the Query filter section and click on Add a Filter then add the filter for Post Relationship or Repeatable Field Group Owners.

From there scroll to the Loop wizard section and then use the Loop wizard to determine which fields you want to display. Finally just add the view to the template that is displaying your partners and your Partner info should start showing up.

Please let me know if this helps.
Thanks,
Shane

#2122763

Here is a link showing the steps im going through. Close to the end, that is where I need to place the shortcodes in.

What exactly am I copying to place on the frontend to display the partner info.

link: hidden link

#2123431

Shane
Supporter

Languages: English (English )

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

Hi Jeff,

I made a small change by deselecting the Partner post type from the view. All that is needed now is to add the view to the template that is displaying the post below.
hidden link

This should allow you to start seeing your repeatable field group .

Thanks,
Shane

#2125403

I have added it to the viewer in the backend. Is there any way to have this added in the frontend?

What if I have a repeater that get separated between 2 custom post type sections.

#2125431

Shane
Supporter

Languages: English (English )

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

Hi Jeff,

Yes there is a way to add it to the frontend. All that is needed is to add the following shortcode to the template that you are using to display the post type.

[wpv-view name='my-view']

Replace 'my-view' with the slug of your view.

What if I have a repeater that get separated between 2 custom post type sections.

I'm not sure I understand correctly here. Is it that you want to display 2 different repeatable field groups from different post types using the same view ?

Please let me know.
Thanks,
Shane

#2125615

Thanks for getting back with me.

The shortcode you provided to me answered by second question.

#2125617

My issue is resolved now. Thank you!