Home › Forums › Add-ons › Repeater Field › Using radio button value in repeater field › Reply To: Using radio button value in repeater field
I feel so dumb right now. The answer was beyond simple. All I had to do was call the field using $testimonialsections['stars'];
:
Full answer (sorry that my indenting gets all screwy when I paste it in here):
<?php
// using normal array
$testimonialsections = get_field('testimonial_section');
$yelp_url = get_field('yelp_url', 'options');
if($testimonialsections)
{
foreach($testimonialsections as $testimonialsection)
{
echo '<div class="inner-test row">
<div class="col-md-12">
<p><span style="font-weight:bold">' .$testimonialsection['testimonial_author'].'</span><br/>' .$testimonialsection['stars'].'</p>
</div>
<div class="col-md-12">
' .$testimonialsection['testimonial'].'
<a href="'.$yelp_url.'" target="_blank">View More on Yelp!</a>
</div>
</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.