Hidden field in acf

Create a field group for just that field. In the Location panel under Rules, set Show this field group if to Current User Role is equal to Administrator – that way, your users won’t see the field group but you still will (good for debugging).

Displaying user data within ACF relational field (user type)

You don’t actually need to call get_userdata(), all the data you need should be in the relational field array: EDIT: Add post ID and User ID to calls to get_field(). <?php $posts = get_sub_field(‘who_to_show’); if( $posts ): ?> <?php foreach( $posts as $post): setup_postdata($post); $user_info = get_field( ‘relational_user_field’, $post->ID ); $image = get_the_field(‘author_image’, ‘user_’.$user_info->ID ); … Read more