Hot answers tagged

4

The register form have different hooks for custom fields. I hope this source example help you. /** * Add custom field to registration form */ add_action( 'register_form', 'fb_show_first_name_field' ); add_action( 'register_post', 'fb_check_fields', 10, 3 ); add_action( 'user_register', 'fb_register_extra_fields' ); function ...


2

I'm not sure if it's what you want, but I got some hints from How to display Wordpress User Registration Form in front-end of the website? and Quick Tip: Making a Fancy WordPress Register Form from Scratch from Tutplus: <?php //add this to use wordpress functions outside wordpress define( 'WP_USE_THEMES', false ); require('wp-blog-header.php'); ...


2

The registration and login forms can be customized easily below a diggest from the codex: Customizing The Registration Form Theme and plugin developers can customize WordPress's built-in user registration page through the use of hooks. Customizing the registration form involves utilizing the following three hooks: register_form Allows ...


2

Alright, finally I sorted it out - and it was a query error (embarrassing it is). Correct code: add_action( 'wpmu_activate_user', 'promote_to_admin', 99 ); function promote_to_admin( $user_id, $password, $meta ) { global $wpdb; $user = get_userdata( $user_id ); $email = $user->user_email; // You need to prepare query first to avoid SQL ...


1

In your signup.php file, try changing the form action from wp-signup.php to signup.php... this way the form data is not passed through the redirect but rather directly back to the same file and this should preserve the $errors from the form posting.


1

You have to copy the original wp-signup.php file, do the changes you need and use it in your theme as a custom template.


1

I dont see anything wrong with the first part. The themes function.php might not be loaded when you create the user. I would put that code into a plugin instead of the theme. A quick way to do that is to create a mu-plugin. For example drop that code into: /wp-content/mu-plugins/mymuplugin.php I do see a problem with your test. You edited ...


1

It's relatively simple to achieve that, you need to use the is_user_logged_in() function, as follows: <div class="fix floatleft sign_in"> <?php if(is_user_logged_in()) : ?> <a ...


1

You can filter the Login URL: add_filter( 'login_url', 'wpse100354_my_login_url' ); function wpse100354_my_login_url( $login_url ){ return site_url( '/your-login-url' ); } Caveat: I haven't tested this. References Codex wp_login_url() Source code Adam Brown's reference for login_url filter Trac page for wp-includes/general-template.php



Only top voted, non community-wiki answers of a minimum length are eligible