Home › Forums › Add-ons › Repeater Field › Accessing sub fields from multiple repeaters › Reply To: Accessing sub fields from multiple repeaters
I changed my code up to the above, but now it doesn’t display the special price…still just the regular.
<?php
foreach ($breakfast_weekday_regular as $bwdr_row) {
$price = $bwdr_row['breakfast_group_price_regular'];
foreach ($special as $s_row) {
if ($bwdr_row['breakfast_group_type_regular'] == $s_row['breakfast_group_type_special']) {
$price = $s_row['breakfast_group_price_special'];
}
}
echo '<div class="buffet-group">' . $bwdr_row['breakfast_group_type_regular'] . ' ' .$price . '</div>';
}
?>
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.