Customising the WordPress User Profile Page without plugins
Yes, there are a few plugins you can use to customise the user profile page, however, with plugins comes “code bloat” so the functions at the bottom of the page are what we use to do the following:
- Clean up the User profile page
- Set the default user role when adding a new user
- Disable the “send email to new user” tickbox
BONUS: I know we said code = bloat but we do actually use the ACF Pro plugin to manage custom fields, it’s the easiest way to get custom fields into any post including the user editing section and provides a wide array of flexibility.
Moving on, let’s look at the profile page BEFORE we apply 3 simple functions.
Before Applying Functions
As you can see there is A LOT of stuff our client does not need to see when he adds/edits a new user to his WordPress.
After Applying Functions
Now you can see that the add user screen holds minimal information and much clearer and tidier to the end user.
What functions did we use for this?
The following code just needs to be added to your functions.php for your current theme and the whole page will be cleared up.
Here is the code
Literally drop the code into the theme functions.php and your user profile page will be cleared up. The only thing you need to do in order to set the default user role on create user, is to enter your default user role. For the profile section, you can add/remove class or ID items to the jquery. For example we are hiding the Yoast stuff as well as other items.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ################################## //programmatically set default role for new users ################################## add_filter('pre_option_default_role', function($default_role){ return 'YOUR_DEFAUL_USERROLE'; return $default_role; // }); ################################## //untick the send the new user and email ################################## add_action( 'user_new_form', 'dontchecknotify_register_form' ); function dontchecknotify_register_form() { echo '<scr'.'ipt>jQuery(document).ready(function($) { $("#send_user_notification").removeAttr("checked"); } ); </scr'.'ipt>'; } ################################## //remove messy profile section items ################################## if( is_admin() ){ remove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' ); add_action( 'personal_options', 'prefix_hide_personal_options' ); } function prefix_hide_personal_options() { ?> <script type="text/javascript"> jQuery( document ).ready(function( $ ){ $( '#your-profile .form-table:first, #your-profile h3:first, .yoast, .user-description-wrap, .user-profile-picture, h2, .user-pinterest-wrap, .user-myspace-wrap, .user-soundcloud-wrap, .user-tumblr-wrap, .user-wikipedia-wrap' ).remove(); } ); </script> <?php } |
BONUS: Showing the custom fields in profile page
Below is a screenshot of how we get the extra profile fields onto the user profile page.

Post Written by Craig Edmonds
Craig is one of the owners of JUCRA Digital and reigns from a hospitality and finance background, however, fell into web design and development in 2000 after leaving the world of finance to go on a sabbatical in Marbella, Spain where he has been ever since. Craig really loves the challenge of the internet, digs WordPress and loves Cpanel.