Skip Navigation

[Resolved] Field with multiple instances

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

Problem:

The issue here is that the user wanted to display the first instance of their repeated field.

Solution:

To do this all you need to do is to add the attribute index=0 to the shortcode.

Example

[types field='images' index='0'][/types]
This support ticket is created 6 years, 6 months 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 2 replies, has 2 voices.

Last updated by francoisP-5 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#727384

Hi! I want to create a search view that will show on a result page.
In the layout section for this view, I want to show a field that have multiple instances (images).
[types field='images'][/types]
What I want to do is show only the first image. I look around to see if I could find the attribute, but no success.
Can you help me with this?
Thank you.

#728765

Shane
Supporter

Languages: English (English )

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

Hi Francois,

Thank you for contacting our support forum.

Could you try doing this.

[types field='images' index='0'][/types]

Please let me know if this helps.
Thanks,
Shane

#730932

Thanks for the quick answer.
You guys have a great day!
François 🙂