Hide Unneeded Profile Fields
Removes clutter from the profile screen, such as the website, biography, keyboard shortcuts and toolbar options, for non-administrators.
Opens WPIDE on
Code
// Profile rows to hide (CSS selectors on profile.php and user-edit.php).
$wpide_hidden_profile_rows = array(
'.user-url-wrap',
'.user-description-wrap',
'.user-comment-shortcuts-wrap',
'.user-admin-bar-front-wrap',
'.user-rich-editing-wrap',
'.user-syntax-highlighting-wrap',
'#application-passwords-section',
);
add_action( 'admin_head', function () use ( $wpide_hidden_profile_rows ) {
$screen = get_current_screen();
if ( ! $screen || ! in_array( $screen->id, array( 'profile', 'user-edit' ), true ) || current_user_can( 'manage_options' ) ) {
return;
}
echo '<style>' . esc_html( implode( ',', $wpide_hidden_profile_rows ) ) . '{display:none !important;}</style>';
} );
Notes
Fields are hidden, not removed; their saved values are kept.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.