Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Display User Custom Groups/Fields in TML Profile Page

$
0
0

Hi.

We need to display Types User Custom Groups/Fields (editable fields as in wp-admin profile page) in the Theme My Login (TML) Profile Page (frontend).

Is there an easy way to do this, or the only way is to code every input for every wpcf-field and validating manually?

For reference, TML author provided this way to add fields:

/** */
function tml_show_user_profile($profileuser)
{
	// add custom fields
	//add_profile_custom_fields($profileuser->data->ID);
	
	// try to display custom user pfoile fields like admin
	if( function_exists('wpcf_admin_userprofile_init') ) wpcf_admin_userprofile_init($profileuser->data->ID);
?>
<p>
	<label for="user_phone">Phone Number</label>
	<input id="user_phone" type="text" name="user_phone" value="<?php echo $profileuser->user_phone; ?>" />
</p>
<?php
}
add_action('show_user_profile', 'tml_show_user_profile');

Any tips? Thanks!


Viewing all articles
Browse latest Browse all 20145

Trending Articles