The title says it: is it possible to query multiple taxonomies for their terms, using the taxonomy field?
So far I’ve tried:
– setting the new taxonomy field’s "taxonomy" value to array("category", "taxonomy2") rather than just "category"
– using the acf/fields/taxonomy/query filter to set $args["taxonomy"] to array("category", "taxonomy2")
I’m using "select" as the "field_type".
The first option does work in that terms from both taxonomies are output in the select box (albeit all together rather than grouped by tax), but it also prints a warning & a couple of notices: ‘Illegal offset type in isset or empty’ in wp-includes/taxonomy :240 & ‘Trying to get property of non-object’ in acf-pro/fields/taxonomy :578 (twice).
The second option appears to be ignored and whatever is set as the taxonomy on the definition of the field is used instead.
I might be missing something… is it possible to use multiple taxonomies in the taxonomy field? Or would this instead be a feature request?
I’m afraid you can’t do it. Since WordPress needs you to provide the taxonomy to get the term, ACF needs it too if you want to return the taxonomy field as a term object. If you set it to multiple taxonomies, ACF won’t be able to know which taxonomy does a term comes from.