Custom Membership Fields

When a user signs up using Wordpress Membership, Step 1 asks for the following:

Choose a Username
Email Address
Confirm Email Address
Password
Confirm Password

How can I customize (add new) fields? I would like to ask for phone number, address, etc.

Secondly, I would like members to be able to edit these fields through their Wordpress membership profile. So that they can change their username, email address, password as well as phone number, address, etc.

Help is much appreciated!!

  • Mason

    Hiya targetd,

    We haven't built in any custom fields for signup into membership (yet, it may happen in the future). If you're using BuddyDress this is built into the 'Profile Field Setup' area.

    If you're using WordPress alone, you can do so with a couple different solutions:
    http://wordpress.org/support/topic/howto-custom-registration-fields
    http://www.cozmoslabs.com/2010/05/31/wordpress-user-registration-template-and-custom-user-profile-fields/

    Hope this helps!

    Thanks!

  • targetd

    Hi masonjames,

    It looks like the Membership plugin uses a different signup form then the built-in Wordpress signup form. If I edit the built-in Wordpress signup form using the links you provided, I don't think that would have any impact on the Membership plugin signup form?

    In the file: membershippublic.php, starting on Line 792:

    function do_subscription_shortcode($atts, $content = null, $code = "") {
    global $wp_query;
    $content = '';
    $error = array();
    $page = addslashes($_REQUEST['action']);
    $M_options = get_option('membership_options', array());
    switch($page) {
    case 'validatepage1': // Page 1 of the form has been submitted - validate
    include_once(ABSPATH . WPINC . '/registration.php');
    $required = array( 'user_login' => __('Username', 'membership'),
    'user_email' => __('Email address','membership'),
    'user_email2' => __('Email address confirmation','membership'),
    'password' => __('Password','membership'),
    'password2' => __('Password confirmation','membership'),
    );
    [continues...]

    I would like to add a new text field called Location, for example. How can I modify the do_subscription_shortcode function to include the new Location field?

    (Ideally, I would like to do this in a way that is future friendly, so that I can update the Membership plugin to the latest version without having to edit the do_subscription_shortcode function each time.)

    Thanks.

  • Barry

    It looks like the Membership plugin uses a different signup form then the built-in Wordpress signup form.

    Yes it does, as it's designed to replace the wp signup process.

    I would like to add a new text field called Location, for example. How can I modify the do_subscription_shortcode function to include the new Location field?

    Have a look at the simple invites membership addon. It's in membershipincludes/plugins directory, the code in there should show you how to add a field to the registration form and how to process the return so that you can save the details.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.