ACF Repeater Field

August 14, 2013 @ 7:26 am Posted to PHP, Wordpress by Antony Koch

The docs for this don’t seem to be working at the moment and the examples I’ve seen after a quick google seem to avoid the API in favour or just treating the repeater as an array.

I thought I’d document the correct usage here in case people questioned the other blogs on the net.

  if ( get_field('item_images') ):
    while( has_sub_field('item_images') ): ?>
      <div class="work-image">
        <?php echo wp_get_attachment_image(get_sub_field('item_image'), 'full') ?>
      </div> <?php
No comments (click to be first!)