Hey there awesome people of ACF,
I have a custom post type called “Menu Items” and a custom taxonomy attached to it to categorize food items like appetizers, main course, dessert, etc.
I have a custom field Group attached with a relationship field type so users can select various menu items and reorder them accordingly. I have customized this to display the thumbnail image and taxonomy w/ help from the documentation here.
What I’m trying to do: Extend the relationship field so that I can have a filter for the various custom taxonomies. You see, when someone is creating a menu page they most likely want to group elements by their category. In the default output, the menu items are displayed alphabetically. Users have to scroll, wait for the ajax to load, scroll more, and eventually pick out their menu items. It would be much easier for them to have checkboxes to tick or untick which would display posts according to their taxonomy in the post listing below.
Here’s images of what I’m talking about. I hope this makes sense!
I think that if you want to do this you’d have to go into the relationship field file and add the functionality. It shouldnt be too hard since Elliot has already added a filter by post type..
If you want it to stay “clean” you can copy the field to your theme, rename it and do the changes there and thus creating a custom relationship field beside the regular one.
The topic ‘Relationship Field with Custom Taxonomy Filter’ 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!