Hi, is there a way to add a taxonomy term using ACF? I’m using the relational taxonomy field type which is great for picking existing terms but to add new ones it seems wordpress’ taxonomy meta box is needed.
cheers
Tom
Hi @blackpenpress
Yes, currently you will need to use WP to create a term. ACF taxonomy field is only to select them.
Hopefully in the near future, we will see this feature added.
Thanks
Elliot
Thanks Elliot,
I’ll see if I can put together a new field type, looks like it shouldn’t be too difficult to add a simplified version of wp’s term adding form to the taxonomy picker.
Thanks for all your work on ACF, it’s an incredibly useful plugin!
Tom
Found a workaround using jquery, it works with an ACF taxonomy single select drop down. It moves the add term form to just under the drop down and when a term is clicked from the drop down it populates the add term field and simulates a click on the add button.
The acf select needs to be set to not update terms.
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j("#my_taxonomy").insertAfter("#acf-my_taxonomy_field");
$j("#tagsdiv-my_taxonomy").hide();
$j("#acf-my_taxonomy_field select").change(function(){
var term = $j('#acf-my_taxonomy_field select').find(":selected").text();
//alert(term);
$j('#new-tag-my_taxonomy').val(term);
$j('#my_taxonomy .tagadd').trigger('click');
});
});