Skip Navigation

[Resolved] Custom search filter with two second-degree post relationships

This support ticket is created 5 years, 6 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 2 replies, has 2 voices.

Last updated by caseyL 5 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1310153

Hi!

I am setting up a custom search and want to have two different post relationships, as in https://toolset.com/forums/topic/search-filter-with-two-post-relation-ships/

The catch is that each relationship is second degree. For example, one of the relationships is that I want to filter on a parent ("season") of a child ("show") of one post type ("performer"). I can get this relationship by itself using [wpv-control-post-relationship ancestors="season@season-show.parent>show@performer-show.child"] in a custom search view for performers. The other relationship is a different one that is also two relationships away from performer. But I understand that I can't have two different post relationships in the same view (wish I could!), so I need to do some coding.

So my question is: is there a way to alter the code in the forum thread above to filter by these second-degree relationships?

Thanks!

#1311145

Hi Casey,

Thank you for waiting.

I've performed some tests on my website with two separate hierarchal post-relationships and I'm afraid the couple of workarounds that I've tested, weren't successful.

Since this kind of filtering is not currently supported out-of-the-box, you're welcome to submit a feature request for this at:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

I'm sorry I couldn't offer more specific assistance in this matter. For more personalized assistance around customization, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1313435

Thanks, Waqar. I will submit a feature request. Having post relationships is the strength of Toolset, so it seems that being able to filter custom searches on any of these relationships (even when they are not simple parent/child ones) should be part of Toolset. I can generate great Views based on these relationships but it's definitely a limitation that I can't do custom search filters on them.