Much like you can select a taxonomy type on a field of type TAXONOMY (when creating a custom field), I need to be able to select ONLY categories (not tags or other custom taxonomies) on a RELATIONSHIP field. So when an editor chooses “Select taxonomy,” only the categories appear in the dropdown.
I’ve exhausted my search on ACF filters. Please advise.
With the relationship field, I can only choose the categories one by one, rather than just choose “categories,” as you can with a Taxonomy custom field. So, as categories change, I’d have to adjust each relationship field, and there are MANY.
Taxonomy custom field = filter by taxonomy TYPE
Relationship custom field = filter by taxonomy TERM
Need the relationship custom field to filter by ALL categories (and ONLY categories, not tags) without selecting each one manually.
I’ve been thinking about this and there could be a solution to ensure that all of the terms in a taxonomy are always included/selected for the filter. This could be done with an acf/load_field filter. Export the taxonomy field to php to get an idea of the settings for the taxonomy selections. In the filter get all of the terms in the taxonomy and populate the acf field setting with the correct values. This way, if a term is ever added to the category it will be automatically added to the list.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users