Home › Forums › ACF PRO › How To Use the User Field & Call Extra Data › Reply To: How To Use the User Field & Call Extra Data
Ok, so I think I might have solved it. Please let me know if this is the best way tho…
$values = get_field('choose_directory');
if($values)
{
echo '<ul>';
foreach($values as $value)
{
$user_db = $value['ID'];
echo '<li>' . $value['display_name'] . '</br>';
the_field('phone_number', 'user_'. $user_db );
echo '</li>';
}
echo '</ul>';
}
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.