Home › Forums › Add-ons › Repeater Field › Troubles with true/false in repeater › Reply To: Troubles with true/false in repeater
I Try to manage someting similar, but the sub_field “zusatzbutton” doesn’t work.
Any thought?
<?php
$seite = get_field('seite');
$zusatzbutton = get_sub_field('zusatzbutton-check');
if($seite) {
echo '<div class="seiten grid-3 wrapper">';
foreach($seite as $s) {
echo '
<div class="seite column">
<div class="seite-bild"><a href="'.$s['button-link'].'"><img src="'.$s['seite-bild'].'"></a></div>
<h2>'.$s['seite-text'].'</h2>
<a class="weiterlesen" href="'.$s['button-link'].'">'.$s['button-text'].'</a>';
if($zusatzbutton == 'yes') {
echo '<a class="weiterlesen" href="'.$s['zusatzbutton-link'].'">'.$s['zusatzbutton-text'].'</a>';
}
echo '</div>';
}
echo '</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.