Adding extra fields to front end signup form

You can read a somewhat extensive tutorial over at: http://www.cozmoslabs.com/1012-wordpress-user-registration-template-and-custom-user-profile-fields/ Basically this is what you’re going to be using to add them to the backend: 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 … Read more

Create Unique ID for user

Here is some code that reads the highest number from the user meta table and then adds +1 to that number. This saves that number for each newly registered user. The code is triggered via the action hook “user_register”. add_action( ‘user_register’, ‘assignuserid’); function assignuserid($user_id) { global $wpdb; $latestid=$wpdb->get_var(“SELECT meta_value from $wpdb->usermeta where meta_key=’memnumber’ order by … Read more

Front-end registration form with password field

If you were to use a plugin that uses shortcode you can call it in your template by using this in your template: <?php echo do_shortcode (‘[your-shortcode]’); ?> You can also do something similar to this form / code below for a front end login: <form method=”post” action=”<?php bloginfo(‘url’) ?>/wp-login.php” class=”wp-user-form”> <div class=”username”> <label for=”user_login”><?php … Read more

Is there any way to not require email address or disable notification upon setting up a member?

Maybe the simplest way is to make a quick plugin that has your own form for inserting users. wp_insert_user() doesn’t require an email address or password, and doesn’t generate an email notification. function wpa70409_add_user(){ $userdata = array( ‘user_login’ => ‘testuser’, ‘display_name’ => ‘Test User’ ); wp_insert_user( $userdata ); }

how to remove header from registration page? [closed]

If you don’t mind editing your themes files, you can remove color.css from the registration page by editing the functions.php file and change line 127 from: wp_enqueue_style( ‘frisco-color-css’); to: if ( ! is_page( ‘register’ ) ) wp_enqueue_style( ‘frisco-color-css’); Otherwise you can include a function in a plugin or similar: add_action( ‘init’, function() { if ( … Read more

How to show password fields on registration form w/o plugins

show_passwords_fields actually is a filter! You can hook into it as you did above, using an anonymous function: add_filter( ‘show_password_fields’, function(){return true} ); You can also write a function, and use it as a callback: function wpse_79994_show_password_fields() { return true; } add_filter( ‘show_password_fields’, ‘wpse_79994_show_password_fields’ ); However, as are only returning a boolean (true or false) … Read more

Add ‘first name’, ‘last name’, ‘date of birth’ and ‘terms and conditions’ to register fields?

Adding fields At first adding some fields to the registering formular add_action( ‘register_form’, ‘extended_register_form’, 10, 0 ); function extended_register_form() { // if an error occurs, we are here again and the // values that are entered in the formular are setup in the $_POST array $age = filter_input( INPUT_POST, ‘age’, FILTER_SANITIZE_NUMBER_INT ); echo ‘<p>’; echo … Read more