Support

Account

Home Forums General Issues Relationship using multiple taxonomies Reply To: Relationship using multiple taxonomies

  • You can’t… Well, I should say, you can’t easily. The taxonomy field only stores the term ID. In order to get the term you must know the taxonomy, which ACF only stores as part of the taxonomy. Also, for the “Save Terms” and “Load Terms” options, the taxonomy must also be know, again, that information is not part of the value of the field.

    In order to do this you’d have to have a field that includes information about the taxonomy and the term. You could possibly build this with a select field and dynamically generate the value for it https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/, for the values you could include the taxonomy name and term ID, or you could potentially use the WP term_taxonomy_is from the wp_term_taxonomy table. But if you want to save and load these terms when saving a post you’d also need to work out the details of that yourself as well and usin wp_set_post_terms() https://codex.wordpress.org/Function_Reference/wp_set_post_terms inside of an acf/save_post filter https://www.advancedcustomfields.com/resources/acf-save_post/. If you have a lot of terms the select field would be huge.