Skip Navigation

[Resolved] Filter view by post relationship with multiple ancestors

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

Problem: I would like to create a front-end custom search View with filters for multiple ancestors in a post relationship.

Solution: Use the Search and Pagination panel to insert a new post relationship filter, and you can choose multiple levels of ancestors to use as filters. See the documentation links below for more information.

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/#2-6-filtering-posts-by-their-ancestors
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/how-to-filter-posts-by-their-ancestors/

This support ticket is created 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by sergeP 5 years ago.

Assisted by: Christian Cox.

Author
Posts
#1389695
Sans titre.png

Hello,

I am trying to create a filter view exactly as in your real estate template website.
hidden link

I created the relationships between country and region / region and city.
But I don't find how to add it in the filter view.
Is there any documentation ?

Looking forward hearing from you soon,

#1390505

Hi, to add the filters like you see for State and City, you will use the Search and Pagination panel to insert a "post relationship" filter. If you cannot see the Search and Pagination panel in the View editor screen, scroll to the top right corner and click "Screen Options". You can turn the panel on here. Then insert a new post relationship filter in the Search and Pagination pane. You can choose which ancestors you want to use as filters in the configuration panel popup. See the two links here for more details:
https://toolset.com/documentation/user-guides/front-page-filters/#2-6-filtering-posts-by-their-ancestors
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/how-to-filter-posts-by-their-ancestors/

Let me know if you have additional questions about that.

#1391071

My issue is resolved now. Thank you!

#1391521

Hello Christian,

Just one last question.
Is it possible to set a url for the "post relationship" filter ?

I mean, is it possible to create a URL that would directly select a filter like I do with category Rock for example :
hidden link

Thank you very much in advance,
Best regards,
Damien

#1391551

Yes it's possible, as you can see here where I have preselected city and state:
https://christiancox-22119-rel-1.discover-wp.com/?wpv-relationship-filter-state=428&wpv-relationship-filter=427&wpv_view_count=347

The actual URL parameters might be different in your case. You should be able to see the proper structure in the URL after you submit the search with the relationship filters populated.

#1393345

Resolved issue 🙂
Thanks