Skip Navigation

[Resolved] Split: Filtering the view based on the custom field of a related post

This support ticket is created 4 years, 2 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 4 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1983567

2) We have two custom post types (Sites and Locations), with a relationship where a Site can have N many Locations. We are able to configure a view to filter based on the Locations posts themselves (such that the view returns all Sites which are related to the selected Location). However, what we would like to do is take the filtering a step further and key off a custom field for Locations - we would like to filter Sites based on the value of a custom field associated with Locations. Is this possible with Toolset views?

#1983613

Hi,

The way search filters work in the views, they can be used only for the custom fields and the taxonomies attached to the post type directly.

This means that if your view is set to show the "Sites" post type, then you'll only be able to filter based on the custom fields and taxonomies, attached to the "Sites" post type directly. Even though the post-relationship exists between the "Sites" and "Locations" post type, you'll not be able to add a search filter for the custom fields and taxonomies from the "Locations" post type.

regards,
Waqar

#1984125

Thanks for the information - is adding this feature (filtering a post type by custom fields/taxonomies which are part of a related separate post type) part of the roadmap currently for toolset?

#1986911

Thanks for writing back.

Yes, we do have an internal ticket to implement this and it is a widely requested feature.

Although I don't have a time estimate to share at the moment, I've added your voice to the matter as well.