Support

Account

Home Forums Backend Issues (wp-admin) Way to add a term Reply To: Way to add a term

  • 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');
       	});
    
    });