Skip Navigation

[Resolved] One to One Relationship, Filter by Taxonomy

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 – 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: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 4 years ago.

Assisted by: Jamal.

Author
Posts
#2154471

I have what I think is a fairly easy to solve problem, but I am a new Toolset user and am not sure about the best approach.

I have created a Location post type and a Location Type taxonomy. The Location Type taxonomy has two entries - Meeting Point and Activity Location. Locations can have either or both types.

I have created an Activity post type, and two Relationships - Activity Location and Meeting Location. Each of these Relationships are one to one - Activity <-> Location.

I would like to filter 'Meeting Point' to only allow selection of Locations with the Location Type 'Meeting Point'.

Similarly, I would like to filter 'Activity Location' to only allow selection of Locations with the Location Type 'Activity Location'.

What is the best approach to do this?

Thank you.

#2154709

Hello and thank you for contacting Toolset support.

Right now, you cannot filter a post type by the taxonomy of a related post type. We will create such a feature in the future, but currently, you cannot have it without some custom coding, or some advanced Toolset skills. For example, you can get the list of activity posts from the 'Activity location', and pass them as a shortcode attribute to a view that will display activities. Does it make sense?

Otherwise, please allow me temporary access to your website and I'll create an example for you. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **