• Resolved robhern135

    (@robhern135)


    Hello,

    I have set up a file upload field on my register form with no issue. I am now trying to access the file url/path etc on the front end so how does it relate to each user?

    I tried using get_user_meta() but cannot see anything relating to it.

    Could you please let me know how I might show the related file in the front end for each user?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    You can use our ‘UWP > User Meta’ widget or shortcode [uwp_user_meta key=’customfield_key’]

    Let me know if this helps.

    Regards,
    Patrik

    Thread Starter robhern135

    (@robhern135)

    Hi,

    I’m looking to be able to grab for instance custom fields and the country field etc like below

    <?php $blogusers = get_users( array( ‘role__in’ => array( ‘author’, ‘subscriber’ ) ) ); ?>

    <?php foreach ($blogusers as $user):

    $user->ID
    $user->first_name

    I would expect something like

    $user-uwp_country
    $user->customfield_key

    as the shortcode is not suitable here.

    I’d prefer to now have to use $wpdb->getresults if possible.

    Thank you!

    Hi,

    For that you can use the our function uwp_get_usermeta($user_id, $key) to get the custom field value and if you want to fetch custom fields value created via form builder using a default WP function get_user_meta($user_id, $key) then also you can just you need to add prefix ‘uwp_meta_’ to the key. For example, if the key is ‘uwp_country’ then you can use something like get_user_meta($user_id, ‘uwp_meta_uwp_country’)

    Let me know if this helps.

    Regards,
    Patrik

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File Upload on User Page show on Front End’ is closed to new replies.