Is there any way to access Ultimate Member's custom fields?

Ultimate User allows you to create custom fields in the register page. I have added address and phone. Where do they go? You cannot edit or even find them in the back end user interface. I added them so that they could appear in the user directory listings and cannot find any way to edit that listing or find the fields.

Topic membership users Wordpress

Category Web


Ultimate Member has a function you can use to get the user meta data.

It is: um_user()

Usage:

<?php echo um_user( $data ); ?>

Example:

<?php 
$custom_field_name = um_user('your_custom_field_name');
echo $custom_field_name; // prints the custom field data
?>

Custom fields are recorded by Ultimate Member in the wp_usermeta table in this form:

enter image description here

So you can get the value of a custom field by using get_user_meta() function:

echo get_user_meta( $user_id, $field_id, true );

Follow this link, https://gist.github.com/magnific0/29c32c7dabc89ab9cae5, and it will show you how to adjust your functions.php file in your themes folder to show the custom UM metadata under the user menu.

works like a charm :)


I can confirm that the values are saved in the User meta table as I have been working on the same exact thing. meta_key contains the name of the input (case sensitive) and meta_value the actual value. User-ID is also a column, so, theoretically, you can get all the values for a certain user. I'm still working on this query so I can get the data for each user on a row. We are also using the paid plug-in WP Data Tables to display the data from Ultimate Member.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.