Pass list with ACF repeater
-
Has anyone had luck combining repeaters with [pass list=x,y,z] ?
The repeater construct is by its nature a loop, so I didn’t want to use a [loop] construct which is what the documentation for ‘list loop’ dictates.
The list works and the values get passed, BUT the looping goes into overdrive.
The [pass list] construct appears to create its own loop, so i end up with it looping through the [pass list] array BEFORE it loops onto the next row in the slide_library (outermost) repeater. It then re-loops through the pass list again for the next repeater row and so on.
Perhaps it is the placement of the end pass [/pass]; I have tried a few ways to no avail. Any help appreciated.
[repeater slide_library] [pass list='fred:1,wilma:2,pebbles:3,bambam:4,betty:5,barney:6'] <hr> <h2>Slide {ITEM_2}. photographed by {ITEM_1}</h2> [-if field=slides_for_cat] <ol> [-repeater slides_for_cat] <li>[field slide_text]</li> [/-repeater] </ol> [/-if] [/pass] [/repeater]
- The topic ‘Pass list with ACF repeater’ is closed to new replies.