Home Forums Feature Requests Possibility to choose different order form Drag&Drop


Possibility to choose different order form Drag&Drop

  • I would love to have the possibility to change the default Drag&Drop Order. Here the link of a problem and a solution for a complex situation:

    I hope you will consider this

  • Hi @gleenk

    Thanks for the link. I’ll have a read over it, but from what I can see, I don’t think ACF can provide a simple API interface for this.

    This is due to the simple nature of the WP_Query object and the meta_query param. Basically, WP only allows for a simple 1 value match, but doesn’t allow you to do much else.

    Custom ordering based on a sub field relationship is just too custom to wrap up into the core. You will need to follow the code provided to re design the array, then sort it.

    If you can think of an easy way to package it into the core, I would love to hear your thoughts.


  • Maybe it could be easier to add an “order” field to the repeater that easily make possible to reorder drag-and-drop items by name ASC or DESC for example. (leaving drag and drop working, so if after reorder I want to drag an Item this impact on the query)
    Something like this for example (see attachment).

  • Hi @gleenk

    Good solution. I’ll consider adding it in, but I’m sure for now you could code up the jQuery in an hour or so.

    Thanks mate

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Possibility to choose different order form Drag&Drop’ is closed to new replies.