Is it possible to remove username field from the registration page? If so, how?

Absolutely YES, you can achieve this. Rule 1: WordPress requires a username. We must provide a username. Rule 2: Don’t edit WordPress core code. We can achieve this by hiding username field, get email and store it as username. Step-1: Remove Username textfield add_action(‘login_head’, function(){ ?> <style> #registerform > p:first-child{ display:none; } </style> <script type=”text/javascript” … Read more

How to allow an user role to create a new user under a role which lower than his level only?

Firstly, you need to add the following capabilities to the Doctor and Receptionist role: list_users edit_users create_users delete_users Now we can get to work with controlling which users they can create/edite/delete. Let’s start with a “helper” function that will return which roles a user is allowed to edit: /** * Helper function get getting roles … Read more

Add multiple custom fields to the general settings page

Well the second bit of code is technically the correct way to do it. However, at the end of the add_settings_field() you can pass arguments. Please view the WordPress Add_Settings_Field function reference. This will help you in getting the best understanding of how the add_settings_field() function really works. Now, with that said, you could use … Read more

How to change the default registration email ? (plugin and/or non-plugin)

The new user email is sent using the wp_new_user_notification() function. This function is pluggable, which means that you can overwrite it: // Redefine user notification function if ( !function_exists(‘wp_new_user_notification’) ) { function wp_new_user_notification( $user_id, $plaintext_pass=”” ) { $user = new WP_User($user_id); $user_login = stripslashes($user->user_login); $user_email = stripslashes($user->user_email); $message = sprintf(__(‘New user registration on your blog … Read more