<?php $images = get_field('gallery'); if( $images ): ?> <?php foreach( $images as $image ): ?> <!-- content here --> <?php endforeach; ?> <?php endif; ?>