Support » Plugin: Advanced Custom Fields: Tag It Field » Reordering Tags

  • Resolved Victoria Clipper

    (@victoria-clipper)


    Hi there and thanks for the plugin. It was introduced into our site by a contractor and now I’m trying to figure something out.

    Is there a way to reorder tags once you’ve set them? I thought I had seen our contractor using drag and drop, but right now our only option is to delete the whole list and reenter it in the order we want.

Viewing 1 replies (of 1 total)
  • Thread Starter Victoria Clipper

    (@victoria-clipper)

    Fix for this was simple. Added the following to field.php

    <script>
    jQuery('#<?php echo $field['id']; ?>').select2({tags: <?php echo $options; ?>});
    jQuery('#<?php echo $field['id']; ?>').select2("container").find("ul.select2-choices").sortable({
    containment: 'parent',
    start: function() { jQuery('#<?php echo $field['id']; ?>').select2("onSortStart"); },
    update: function() { jQuery('#<?php echo $field['id']; ?>').select2("onSortEnd"); }
    });
    </script>;
Viewing 1 replies (of 1 total)
  • The topic ‘Reordering Tags’ is closed to new replies.