Hi, I’m using a taxonomy field to allow a client to select related terms for a post. I noticed it’s a regular select field in the admin settings and you can only select one taxonomy.
Is there anyway possible to do the same thing but allow the user to select terms from multiple taxonomies – maybe with another field type?
If not, an idea for an update to the taxonomy field. Would be rather simple;
get_object_taxonomies( $arrayOfSetTaxsByUser );
Right? 🙂
Cheers!
Hi @breadadams
It could be a nice update. I think that the reason it’s not been implemented is due to the way taxonomies shared terms in WordPress up until just recently with 4.3 (and in 4.4 the taxonomy parameter for functions such as get_term_by
will be optional). That could cause a clash if there was multiple taxonomies terms to choose from since it would be impossible to know which taxonomy the user means to select the term for. It’s a bit messy to try to explain but hopefully you get my point 🙂
However now that these have been completely separated in 4.3 I can’t see why it would not work any more. I’ll assign this to @elliot so he can say his two cents about it when he’s got the time.
In the meantime you could create your own field type for this.. just base it on the current taxonomy field and you’ll probably wont have to tweak much.
Awesome, thanks Jonathan. Will see if can steer the client another way, if not, I’ll take a look into customizing the taxonomy field.
You’re welcome 🙂
If you do end up tweaking the taxonomy field you could post a link to it here.
While Elliot probably wont just include it in ACF it may speed up the process for him to add the same functionality to core.
Have a good one