Support

Account

Home Forums General Issues User Field Type Issues Reply To: User Field Type Issues

  • The user field will return an array of arrays.

    
    $users = get_field('guests2');
    // for testing
    echo '<pre>'; print_r($users); echo '</pre>';
    
    if ($users) {
      foreach ($users as $user) {
        $userID = $user['ID'];
        $profile_image = get_field('profile_image', 'user_'. $userID);
        $biography = get_field('biography', 'user_'. $userID);
        // code for displaying values here
      }
    }