Question

I have to add simple options to my custom taxonomy (genre) for each custom post included in that specific taxonomy.

  • Taxonomy name: Genre
  • Taxonomies: Blues, Jazz, Rock
  • Custom post name: Bands
  • Bands: Band One, Band Two Band Three, Band Four

So basically going to the Jazz taxonomy options, should give me options for the Jazz bands:

  • Band Two {text_field}
  • Band Four {text_field}

I'm not achieving this with Advanced Custom Fields so I guess I need to write it? Or is there a plugin to save my life? If not where should I start looking?

Was it helpful?

Solution

If what you mean is that you want to extend your custom taxonomy to have more fields that the default: Name, Slug and Description, you can:

  1. Use a massive plugin like Pods, which allows you to do what you want to do and much more stuff. See their docs.
  2. Use a simple plugin like Tax-Meta-class, intended just for that purpose, which does not add many (probably unnecesary) code.
  3. Try to do it manually, like in this example.

Note that I have not used any of these, but I'd strongly suggest you to try the option 2.


EDIT
Actually, if you're already using Advanced Custom Fields plugin, it allows you to do what you're looking for!

You just need to create a new Field Group and set up the custom fields you want as usual. Then, in the box Location, you need to set a Rule like this:

Show this field group if
Taxonomy Term ----- equals to ----- Genre

This way you have all the power of ACF to create select-boxes or whatever you need...


EDIT 2
If what you want is to have different custom fields in a Post, depending on the Terms that this post has for a given taxonomy, you have to set up a Rule for your Field Group like this:

Show this field group if
Post Taxonomy ----- equals to ----- Jazz

This will display this Field Group in all the Bands with a value of Jazz in the Genre taxonomy...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top