Support » Plugin: User Registration & User Profile - Profile Builder » get user fields on a template page

  • Resolved hattavb

    (@hattavb)


    hy
    im using a wp query to get all users by
    ids on a new template page
    but i dont knew how to show the plugins fields?
    Big THANKS

    • This topic was modified 3 years, 4 months ago by hattavb. Reason: to say thank y
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Georgian Cocora

    (@raster02)

    Hello @hattavb,

    You must do a second query using get_user_meta() and the ID of the user from WP_User_Query in order to get all the data from the custom fields attached to the user.

    Example:

    //WP_User_Query loop
    $usermeta = get_user_meta($user_id);
    

    Will return an array with all the fields for that user_id.

    Regards.

    thank you
    sir thats helped me out )
    but is there a way the fields by custom field name
    for example

    echo get_user_custom_field(‘the_biography’);
    echo get_user_custom_field(‘the_avatar’);
    ?
    thank you sir

    got it
    😀

    <?php echo get_user_meta( $user_id, ‘nickname’, true ) ; ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get user fields on a template page’ is closed to new replies.