Home Forums Front-end Issues Tag field with auto-creation of new tags Reply To: Tag field with auto-creation of new tags

  • I suppose that most people find the existing field enough.

    As far as adding this to ACF, you’d need to ask the developer

    Here’s another option because most of the issue stems from needing to click on the + link when hovering over the field. Add an acf/render_field filter This solution depends on JQuery being loaded, which it should be.

    // replace field_XXXX with your field key
    add_filter('acf/render_field/key=field_XXXX', 'add_term_add_link', 20, 1);
    function add_term_add_link($field) {
        <a href="javascript: $('[data_key="field_XXXX"] .acf-input [data-name="add"]').trigger('click');">Add a Category</a>

    What this does is to add a link below the field that when clicked will trigger the same action as clicking on the +. You can then style it as a button or whatever makes the most sense.