• I need to add some additional fields to user registration.i add users as admin so how i modify the admin side add new page to get this done.ex:i need to add address of a user.

Viewing 1 replies (of 1 total)
  • Hi,
    Could you please try this below code in your theme functions.php file to add any custom field to user profile?
    need to replace the field name twitter to address. Or create a new field by new line in side the function.

    thanks!

    /**
    * Add new fields into ‘Contact Info’ section.
    *
    * @param array $fields Existing fields array.
    * @return array
    */
    function tm_additional_contact_methods( $fields ) {

    $fields[‘twitter’] = ‘Twitter’;
    $fields[‘facebook’] = ‘Facebook’;
    $fields[‘google-plus’] = ‘Google +’;

    return $fields;
    }

    add_filter( ‘user_contactmethods’, ‘tm_additional_contact_methods’ );

Viewing 1 replies (of 1 total)
  • The topic ‘Add custom fields to Admin Side add user’ is closed to new replies.