Skip Navigation

[Resolved] How to filter by a taxonomy of posts in relationship?

This support ticket is created 2 years, 11 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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2068381

Tell us what you are trying to do?
I have 2 post type in relationship, Public Listing and Restricted Listings.
I am trying to create a search filter for Public Listing by taxonomy. But not by the category of Public Listing which is on "content Selection" but by the category of related posts of Restricted Listing. How can I do it?

#2068573

Hello,

There isn't such kind of built-in feature within Toolset Views/Blocks plugins, Toolset Views/Blocks plugins are using WordPress built-in class WP_Query to query posts, you can filter the result by taxonomies of current post type(Public Listing), you can not filter the result by taxonomies of another post type(Restricted Listing)
See WP document:
https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters

In your case, you might consider to move the custom taxonomy into post type "Public Listing"

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.