Home › Forums › Add-ons › Options Page › How to disallow a selected field if selected in a previous post › Reply To: How to disallow a selected field if selected in a previous post
This is a bit of a tricky one, but is possible using a filter on the relationship query.
Check out the docs page (http://www.advancedcustomfields.com/resources/tutorials/customize-the-relationship-field-list-query/) and you will find code to alter the results available in the relationship list.
You will need to use this filter to add an exclude argument to the $args. Please research the WP_Query args before doing this.
As for finding the ID’s to exclude, I’m not sure how you will do this.
Good luck
Thanks
E
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.