In your theme’s functions.php;
// Extra Account info for Customers on account edit page
add_action('um_after_account_general', 'customer_custom_fields', 100);
function customer_custom_fields() {
global $ultimatemember;
$id = um_user('ID');
$output = '';
$names = ["your_custom_field"];
$fields = [];
foreach( $names as $name ) {
$fields[ $name ] = $ultimatemember->builtin->get_specific_field( $name );
}
$fields = apply_filters( 'um_account_secure_fields', $fields, $id );
foreach( $fields as $key => $data ) {
$output .= $ultimatemember->fields->edit_field( $key, $data );
}
echo '<div class="um-account-heading uimob340-hide uimob500-hide"><i class="um-faicon-user"></i>Other Info</div>' . $output;
}
If you’re unfamiliar with PHP, you can add more by modifying the $names declaration:
$names = ["your_custom_field", "another", "and_another_one"];
Hi. You need to create a Profile form to expose to the user on the front-end. Use the fields you placed on the registration form as the fields on the profile form.
@jx4550, clratliff has the obvious answer, but I’m interested in what you put… where does the result show up for that action? On the default profile form? Also are the $names meant to be the meta keys for each field?
-
This reply was modified 8 years, 3 months ago by
dmcknight.