Skip Navigation

[Resolved] display the first item group of repeatable items in a view

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

Problem:
How to display the first item of a Repeatable Field Group on each post?

Solution:
You can create a View that displays your RFG (Repeatable Field Group) items
Add a query filter so it displays the RFG items that belong to the post where you'll insert this view.

Then ensure the View Ordering option is set to orderby toolset-post-sortorder field, in an ASC order.
In the Limit and Offset settings, set to display 1 item, skip 0 items.

This will display the first RFG item for the post where you'll insert this View.
If you drag and drop the RFGs on the post in a new position this will change the View output, and set a new RFG as the "first", and only output item.

This support ticket is created 4 years, 7 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.

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 6 replies, has 2 voices.

Last updated by Franco Calcagni 4 years, 6 months ago.

Assisted by: Beda.

Author
Posts
#1581511

We have a repeatable group fields and we need to display the first item only in a view

#1582039

You can create a View that displays your RFG (Repeatable Field Group) items
Add a query filter so it displays the RFG items that belong to the post where you'll insert this view.

Then ensure the View Ordering option is set to orderby toolset-post-sortorder field, in an ASC order.
In the Limit and Offset settings, set to display 1 item, skip 0 items.

This will display the first RFG item for the post where you'll insert this View.
If you drag and drop the RFGs on the post in a new position this will change the View output, and set a new RFG as the "first", and only output item.

I hope this helps!

#1582067

Hi Beda, thanks for your reply, could you please send me a screenshot of the view settings so to configure it correctly?
Thanks in advance
If I want to display all repeating group fields belonging to that post what changes shall I do in the view configuration?
Franco

#1582079
Bildschirmfoto 2020-04-11 um 17.36.27.png

The View settings look like this

#1583751
template.jpg
view.png

Hi Beda, I created a view with the settings you listed and placed it in a content template but I get the result "no items found"
I enclose the 2 screenshots, what could be the problem?

In addition, if I have to place this view within a slide in the slideshow of the homepage, how can I achieve the result since the post is not directly the post where the view is shown but another page?

#1584877

Then you have either no Repeatable Field Groups on that Post, or maybe imported them with a code that does not import the Toolset Sort Order Field, or created them with Toolset Forms, which also does not include that field (by mistake, there are plans to fix that)

Can you ensure the post you tested has indeed some RFG of that type and then if it still doesn't work, save that post once again to test?

Related to your addon question I suggest opening a new ticket, I am not sure this works. It might be possible (depending on your setup) with some ShortCode attributes.

#1585017

My issue is resolved now. Thank you!