Support

Account

Home Forums Add-ons Repeater Field Get repeater values of a certain value Reply To: Get repeater values of a certain value

  • Managed to do this in the end with the below code:-

    <?php if( have_rows('local_amenities', $development_page) ): ?>
    	<?php while( have_rows('local_amenities', $development_page) ): the_row(); // loop through rows (parent repeater) ?>
    		<?php if (get_sub_field('type_of_amenity') == 'supermarkets') { ?>
    			<p><?php the_sub_field('amenity_name'); ?></p>
    			<p><?php the_sub_field('amenity_address'); ?></p>
    			<p><?php the_sub_field('type_of_amenity'); ?></p>
    		<?php } ?>
    	<?php endwhile; ?>
     <?php endif; ?>