Home › Forums › Backend Issues (wp-admin) › Relationship field: hide empty terms….. › Reply To: Relationship field: hide empty terms…..
ACF does not have any filters for alter the taxonomy/term list shown in a relatiohship field.
You would have to use a pre_get_terms filter
To apply this filter to only the field being displayed your would use the acf/render_field action and you would have 2 actions, one that happens before acf renders the field to add your filter and one after acf renders the field to remove your filter.
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.