Roles at registration (classipress)
In your functions.php file do this: add_action(‘register_form’,’register_role_field’); add_action(‘register_post’,’check_fields’,10,3); add_action(‘user_register’, ‘register_role_fieldforuser’); // This will register new field in registration form function register_role_field(){ ?> <label>Choose your role:<br/> <!— Let’s check if there role already set. If $_GET[‘role’] = 0 -then this is teacher if 1 = student —> <?php if ( isset( $_GET[‘role’] ) ) { ?> … Read more