Skip Navigation

[Resolved] How to use repeatable field as filter?

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

Problem:
How is it possible to filter posts by a field which is part of a repeatable field group?

Solution:
It is currently not possible, because the fields actually belong to a custom post type created to act as a container for the repeatable fields. This feature will be added to Views, but is currently not possible.

This support ticket is created 6 years, 4 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by Nigel 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#919822

I have a repeatable field group with name "Details", under this group I have a field with name "Destination". How can I use this field (i.e. Destination) as filter?

As currently repeatable field group is not showing in filter option.

#919856

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

It seems that you can't.

Because of how repeatable field groups are implemented, the custom fields themselves are not stored against the original post alongside other custom fields, and are instead stored against a repeatable fields group post which acts as a container for the fields and is connected to the original post.

As a rule, you cannot filter something by anything which is not a property of that thing itself, and the fields inside the repeatable field group are not a property of the original post.

This should be possible when Views is extended to allow filtering by fields of related posts, but I don't have a timetable for when that will be added, it is not actively being developed at the moment.

I will raise it in a meeting with developers tomorrow and update you.

#920186

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The developers confirmed that it is a priority to add support for this.

The current dev cycle is focused on features that were sidelined during work on Types 3—we are catching up a little—and after these features are published we will return to complete some work on post relationships that didn't make it into the initial release.

Filtering by fields of related posts—which will also include filtering by fields within repeatable field groups—will be one of the main updates.

So, the developers know this is a priority and will add support as soon as possible.

#1072553

Thank you Nigel.

I just want to know when will be this feature added to Views?

#1072556

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, I still don't have an ETA for you.

I mentioned above what the current dev focus was, and that work is ongoing, so work on adding support for this hasn't begun yet, and it should be expected that it will take some time to implement and test before being released.