Home Forums ACF PRO Randomize Repeater Rows… Reply To: Randomize Repeater Rows…

  • I’ve actually never used array_rand before so I did some testing. Basically what I found was that no matter how many items you want returned, the keys are always returned in order. So it you pick 3 of 5 you might get 0, 2, 4 but never 4, 0, 2. So when selecting the 5 of 5 it will always return 0, 1, 2, 3, 4

    shuffle is what you’re looking for

    $repeater = get_field('contributors_grid','option');