Home › Forums › General Issues › User field type › Reply To: User field type
Thanks for the reply mtv.jcil, but I’m still not getting this to work. I know it’s probably super simple but I can’t seem to make it work.
I have a field on a custom post type that associates that post with a user. In my template file, I’m just trying to echo the ID of that user. Here’s a simplified version of what I’m using, just to test if it works.
<?php
$person = get_field('person_author');
$person_id = $person['ID'];
?>
<p>ID: <?php echo $person_id[0]; ?></p>
It’s not echoing anything though. Mine’s not in a repeater so I changed it to get_field.
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.