Add metadata to custom taxonomy

Question

Is it possible to add metadata to a custom taxonomy, registered with:

https://developer.wordpress.org/reference/functions/register_taxonomy/

I have the Advanced Custom Fields plugin and can use this to add metadata to terms within a taxonomy, but not the taxonomy itself.

For background, I have several non-hierarchical but related taxonomies e.g.

  • Customer age: 0-12, 13-17, 18-24, 25-35
  • Drinks: Wine, Beer, Water, Coke

These would be represented by dropdowns in the front-end.

If a user selects age ‘0-12’ for example I want to disable ‘Wine’ and ‘Beer’ from the ‘drinks’ menu. I’m exploring different ways of structuring my data to enable this.

0
, Matt Saunders 2 years 2020-01-09T08:40:07-05:00 0 Answers 92 views 0

Leave an answer

Browse
Browse