Support

Account

Home Forums General Issues How to var dump Reply To: How to var dump

  • Aha, I missed that this was for a profile! It’s good that you’re seeing the <pre> tags, but to get user profile fields you have to pass in the user ID prepended with “user_”.

    http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-user/

    So to get the field for user ID zero:

    $user_id = 0;
    $field = get_field('test_acf_upload', 'user_'.$user_id);
    echo '<pre>'.print_r($field, true).'</pre>';

    You could get the user ID with a variety of functions.