Support

Account

Home Forums Front-end Issues How to populate on frontend with USER data? Reply To: How to populate on frontend with USER data?

  • To get an ACF field associated with the user you need to provide the user id in the form of "user_{$user_id}" or the user object as returned by wp_get_current_user()

    
    $user_id = get_current_user_id();
    $value = get_field('field_name', 'user_'.$user_id);
    
    // OR
    
    $user = wp_get_current_user();
    $value = get_field('field_name', $user);