Home › Forums › Add-ons › Repeater Field › Pulling in single data › Reply To: Pulling in single data
Hi @antsykes95
In this case, I think you can modify the code I gave you before to something like this:
// this data is retrieved dynamically
$current_dj = "current dj name";
$repeater_value = get_field('presenter_list', 'option');
foreach( $repeater_value as $row ){
if( $row['presenter_name'] == $current_dj ){
echo $row['presenter_bio'];
echo $row['presenter_image'];
}
}
But just as you said, I believe the best way to achieve it is by using a custom post type instead.
I hope this makes sense 🙂
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.