Home Forums ACF PRO Choosing when to sort repeater fields.


Choosing when to sort repeater fields.

  • When reordering repeater fields using the advanced example, is it possible to only reorder in certain instances?

    For example, if I have a track_listing repeater field, but in one instance, I want to sort in reverse, but everywhere else I want it to display not in reverse, how can I achieve this?

    It seems that I can only sort, or not sort as set in the load_value function, regardless of implementation.

  • Hi @andycheeseman

    I’m not sure wether you’re asking if you can select when to do specific sorting or IF you can reverse the sorting?

    In the example this is used:
    array_multisort( $order, SORT_DESC, $value );
    so to sort the other way around you could do
    array_multisort( $order, SORT_ASC, $value );

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

The topic ‘Choosing when to sort repeater fields.’ is closed to new replies.