Remove Personal Options in WordPress Admin Profile Page

/* This function removes fields on the Profile page (user Profile) of the WordPress dashboard. It shows you how to remove fields in the Personal Options section, Name section, Contact Info section, and About Yourself section. Here is a list of which field of the user Profile each line removes. If you don’t want to remove one of those fields, then you can erase that corresponding line in the code, or just comment it out by adding two slashes at the beginning of that line in the code, like this: //. This code will add some JavaScript to the head of your WordPress admin, not on the front of your site. This code uses jQuery. To use this code, you would add it to your functions.php file */ <?php function remove_personal_options(){ echo '<script type="text/javascript">jQuery(document).ready(function($) { $(\'form#your-profile > h2:first\').remove(); // remove the "Personal Options" title $(\'form#your-profile tr.user-rich-editing-wrap\').remove(); // remove the "Visual Editor" field $(\'form#your-profile tr.user-admin-color-wrap\').remove(); // remove the "Admin Color Scheme" field $(\'form#your-profile tr.user-comment-shortcuts-wrap\').remove(); // remove the "Keyboard Shortcuts" field $(\'form#your-profile tr.user-admin-bar-front-wrap\').remove(); // remove the "Toolbar" field $(\'form#your-profile tr.user-language-wrap\').remove(); // remove the "Language" field $(\'form#your-profile tr.user-first-name-wrap\').remove(); // remove the "First Name" field $(\'form#your-profile tr.user-last-name-wrap\').remove(); // remove the "Last Name" field $(\'form#your-profile tr.user-nickname-wrap\').hide(); // Hide the "nickname" field $(\'table.form-table tr.user-display-name-wrap\').remove(); // remove the “Display name publicly as” field $(\'table.form-table tr.user-url-wrap\').remove();// remove the "Website" field in the "Contact Info" section $(\'h2:contains("About Yourself"), h2:contains("About the user")\').remove(); // remove the "About Yourself" and "About the user" titles $(\'form#your-profile tr.user-description-wrap\').remove(); // remove the "Biographical Info" field $(\'form#your-profile tr.user-profile-picture\').remove(); // remove the "Profile Picture" field $(\'table.form-table tr.user-aim-wrap\').remove();// remove the "AIM" field in the "Contact Info" section $(\'table.form-table tr.user-yim-wrap\').remove();// remove the "Yahoo IM" field in the "Contact Info" section $(\'table.form-table tr.user-jabber-wrap\').remove();// remove the "Jabber / Google Talk" field in the "Contact Info" section });</script>'; } add_action('admin_head','remove_personal_options'); ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.