Home › Forums › Feature Requests › Taxonomy filter for relationship field
First of all massive thanks for creating this awesome plugin, so versatile that I’ve never needed to make a feature request 🙂
But this time i’ve run into a small shortcoming (i think?).
When you create a relationship field, you can filter the field by one or more taxonomies. You can also add a “Post Type Select” filter. However, I want the end user to choose items from a custom taxonomy, and filter the relationship field accordingly, something similar to the “Post Type Select” filter.
Is there a way to do this?
—
Let me draw you the situation to make my idea more clear:
I’m building a website that allows the end user to build a kitchen by choosing from several components.
There is a post type called “setups”. It contains all the base kitchen styles.
Then there is a post type called “appliances”, it contains a taxonomy for different appliance categories (fridge, dishwasher, oven etc). All appliances are categorised within this taxonomy.
I’ve added a relationship field to the “setups” post type which lets you select which appliance should be displayed for the specific kitchen setup (some don’t fit, or don’t apply etc).
It currently lists ALL the appliances randomly in one single list, just with model numbers and thumbnails. Because there is so many options, it becomes very hard to manage. It would be great to order the list by the appliance category taxonomy.
—-
Would this be possible? Are there any other workable solutions? I’ve thought of adding a relationship field for every appliance category taxonomy item, but i would need to create a new field and edit the code everytime a new item is added to the taxonomy.
Thanks!!

Hi @tycoon12344,
Thanks for the post.
I am thinking that it should be possible to filter the appliances shown on the relationship field by using the acf/fields/relationship/query.
Please have a loop at this page for more info: https://www.advancedcustomfields.com/resources/acf-fields-relationship-query/
I hope this helps.
The topic ‘Taxonomy filter for relationship field’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.