Types plugin provides an easy way to add and manipulate User Fields for user profiles via a graphical interface. With User Fields, you can create sites with rich user attributes.

User Fields highlights:

  • Complete support for all Types field kinds
  • API and Views support for displaying User Fields
  • Access control for choosing who can edit and view User Fields
  • Easy customization using a built-in CSS editor

Create a group for User Fields

Go to the Toolset -> Custom Fields page and click the User Fields tab. Then, click the Add New Group button.

User Fields in Types

Use the Where to display this group section to select the user roles that this User Fields group should appear for.

Once the group is created and its options are set, add fields to it.

Adding fields to the group

Click on Add New Field and select a field type from the dialog box that appears. For each field, enter the name, optionally change the slug, enter a description and set whatever options the field has.

Field setup

Add any other fields that you want to include in this group and click on Save Field Group.

Using the fields on user profiles

When you are done, you will see this new fields group on the User Profile page.

User meta fields on profile page

Please note that by default, WordPress does not allow users with the Subscriber role to upload files. If you need to allow this in your site, please add the following code snippet to your theme’s functions.php file.

Enable Subscriber Upload
if ( current_user_can( 'subscriber' ) ) {
    add_action( 'load-profile.php', 'wp_enqueue_media' );

    if( ! current_user_can( 'upload_files' ) ) {
        add_action('admin_init', 'allow_subscriber_uploads');
    }
}

function allow_subscriber_uploads() {
    $subscriber = get_role('subscriber');
    $subscriber->add_cap('upload_files');
}

Displaying User Fields

Types includes a complete API for displaying custom fields. You can use it in your PHP templates or (better) display user fields with Views and no coding.

When you are done adding to the WordPress admin, learn how to display user fields.