Hi,
I have a select field inside the repeater field in option page, i am trying to use conditional statement so if the select field value is horizontal it displays horizontal and if the select field value is vertical it displays vertical.
Thank you.
Figured it out 😉
<?php if( have_rows('optionpage', 'option') ): ?>
<?php while( have_rows('optionpage', 'option') ): the_row(); ?>
<?php
$layout_type = get_sub_field('page_layout');
if ($layout_type == 'vertical'){
echo 'vertical';}
else {
echo 'horizontal';}
?>
<?php endwhile; ?>
<?php endif; ?>