Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a question and would like help from friends. I want to add two fields on the page of users registered on my blog. I added some pictures to brighten my explanation.

  1. When we register a user manually, following User> Add User, I would add this field: enter image description here
  2. When a user is already registered and following User> Users> (select the user and click edit), I would add this field: enter image description here

I saw several blogs / forum that show how to add input on the contact and how to create a new block, but found nothing that could be the way I like.

thanks

share|improve this question
    
possible duplicate of How To Add Custom Form Fields To The User Profile Page? –  kaiser Aug 25 '11 at 19:41
    
Please search before asking –  kaiser Aug 25 '11 at 19:42
    
You read my post? You looked at the pictures? Add fields that way I know. I would like to add on down the field select Role. –  Andre Aug 25 '11 at 20:03
    
You arrow cleary points below the field, not at the select-option drop-down field. And I can't read that you want to add additional roles in your Q. There are plugins for that. Example: Role Scoper and various others. –  kaiser Aug 25 '11 at 20:16
1  
First: Never edit core files. These edits are lost on update. Second: It's exactly what I thought - a duplicate. See the the linked Q. –  kaiser Aug 25 '11 at 22:06
show 2 more comments

2 Answers

check this link Add Custom Fields to User Profile

share|improve this answer
add comment

For a quick solution put this code in functions.php of your theme:

add_action( 'show_user_profile', 'show_extra_profile_fields', 10 );
add_action( 'edit_user_profile', 'show_extra_profile_fields', 10 );

function show_extra_profile_fields( $user ) { ?>
    <input type="text" name="twitter" value="<?php echo esc_attr( get_the_author_meta( 'twitter', $user->ID ) ); ?>" />
<?php }

Or you could do it with a plugin: http://www.cozmoslabs.com/wordpress-profile-builder/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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