Support

Account

Home Forums Backend Issues (wp-admin) Updating taxonomy fields Reply To: Updating taxonomy fields

  • I may have found somehting :

    in wp-admin\include\meta-boxes.php, search <p> markup with the class
    class="category-add wp-hidden-child"

    on <input type="button" add a onclick :

    <input type="button" onclick="refresh_taxonomy_field_<?php echo $taxonomy; ?>();"

    after this, add a JS :

    <?php
    echo '<script type="text/javascript">
    function refresh_taxonomy_field_'.$taxonomy.'() {
      var new_val = document.getElementById("new'.$taxonomy.'").value;
      var acf_field = document.getElementById("acf-field-'.$taxonomy.'");
      var opt = document.createElement("option");
      opt.value = new_val;
      opt.innerHTML = new_val;
      acf_field.appendChild(opt);
    }
    </script>';?>

    not very clean, but it works !