Hi,
I have two kind of ads to show on a view: profesional services and events.
Each ad is related to a third post type: postal code.
There are 2 one-to-many relationships: postalcode-service / postalcode-event /
I've created a view selecting both post types on content selection.
The idea is to have a unique view mixing both types, and be able to make a first parent filter to choose what kind of ads you want to see. Once it's selected that filter it should open other options for that post type.
While creating Query Filter in view, I am only able to select one relationship.
Is this posible? I am working on the good direction?
Thanks!
Hello,
It is expected result, one post view can only add one post type relationship filter.
But it is possible with custom PHP codes, for example you can use filter hook "wpv_filter_query" to trigger a custom PHP function
https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
In this PHP function add other post type relationship filter, see our document:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/how-to-migrate-your-site-to-new-post-relationships/#advanced-example
See similar thread here:
https://toolset.com/forums/topic/search-filter-with-two-post-relation-ships/#post-1216763
My issue is resolved now. Thank you!