Home › Forums › Add-ons › Options Page › Select specific repeater rows from an options page › Reply To: Select specific repeater rows from an options page
Yeah I had pretty much used the same code as above as.
<?php
$selection = get_field('sa_select_bookmaker', 'option');
if( !empty( $selection ) ) {
if( have_rows( 'side_ads', 'option' ) ) {
while( have_rows( 'side_ads', 'option' ) ) {
the_row();
$title = get_sub_field('sa_bookmaker');
if( in_array( $title == $selection ) ) {
$title = get_sub_field('sa_bookmaker');
$org = get_sub_field('left_ad');
$img = get_sub_field('right_ad');
?>
<?php echo $title; ?> <?php echo $org; ?> <?php echo $img; ?>
<?php
}
}
}
}
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.