Home › Forums › General Issues › User Field (Relational) › Reply To: User Field (Relational)
The user field returns an array of user information, similar to what the WP function get_users() does. I don’t think there has ever been documentation on the user field. You’ve got to do some experimenting to see what’s there.
To see what is in the returned value use
echo '<pre>'; print_r(get_sub_field('author')); echo '</pre>';
to show the values you need to use
$users = get_sub_field('author');
and then show what you need. It might be a nested array, I’m not sure.
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.