1

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

1

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/

0

check this link Add Custom Fields to User Profile

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.