2

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.

1
  • 1
    They probably go in the user meta table if it's data specific to a user. I imagine the documentation for that plugin will tell you what the key names are, or you can use get_user_meta to fetch all meta data for a user, which will also tell you what keys the data is stored under.
    – Milo
    Jun 22 '18 at 3:29
2

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.

1
  • Lisa, I have found the same thing. The user_meta includes all of the users that I imported through a CSV file. I created a short code and experimented with that to access each of my fields. The next step will be to replace their template with my own to get my directory listing in the desired format.
    – mkstlwtz
    Jul 2 '18 at 21:17
1

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 :)

1
  • Yhanks for posting this. It's better to actually post the code here (in case the owner of that code decides to pull it and then all we have here is a dead link.
    – rudtek
    Jun 6 '19 at 18:12
1

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
?>
0

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 );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.