I’m trying to ‘shuffle’ the results in the flexible content field so that they appear in a random order. I know this is possible with the repeater using a foreach loop (http://support.advancedcustomfields.com/forums/topic/random-repeater/), however I’ve not been able to get the flexible content field to display results with a foreach correctly (I’m not sure where I’m going wrong!).
I’m getting the results for the current flexible content field using the below:
You will need to use a foreach loop to iterate over the flexible content layouts.
The code will look much the same as the repeater fiedl example, exept you will need to look at the ‘acf_fc_layout’ value instead of get_row_layout().
When you loop through the rows, just print_r the $row to see what data is a available to you