Plugins Reviews How to Remove Personal Options section from Profile Page

How to Remove Personal Options section from Profile Page

Spread The Love

In this article, we’ll be discussing How to remove personal options section from WordPress Page. The below function removes fields on the Profile page of the WordPress dashboard.

Remove Personal Options Section

 

// Remove fields from Admin profile page
function wordpress_remove_user_personal_options($personal_options) {
 $personal_options = preg_replace('#<h2>' . __("Personal Options") . '</h2>#s', '', $personal_options, 1); // Remove the "Personal Options" title
 $personal_options = preg_replace('#<h2>' . __("Name") . '</h2>#s', '', $personal_options, 1); // Remove the "Name" title
 $personal_options = preg_replace('#<h2>' . __("Contact Info") . '</h2>#s', '', $personal_options, 1); // Remove the "Contact Info" title
 $personal_options = preg_replace('#<h2>' . __("About Yourself") . '</h2>#s', '', $personal_options, 1); // Remove the "About Yourself" title
 $personal_options = preg_replace('#<tr class="user-rich-editing-wrap(.*?)</tr>#s', '', $personal_options, 1); // Remove the "Visual Editor" field
 $personal_options = preg_replace('#<tr class="user-comment-shortcuts-wrap(.*?)</tr>#s', '', $personal_options, 1); // Remove the "Keyboard Shortcuts"
 $personal_options = preg_replace('#<tr class="user-display-name-wrap(.*?)</tr>#s', '', $personal_options, 1); // Remove the "Display name publicly as" field
 $personal_options = preg_replace('#<tr class="user-url-wrap(.*?)</tr>#s', '', $personal_options, 1); // Remove the "Website" field
 $personal_options = preg_replace('#<tr class="user-profile-picture(.*?)</tr>#s', '', $personal_options, 1); // Remove the "Profile Picture" field
 $personal_options = preg_replace('#<tr class="user-description-wrap(.*?)</tr>#s', '', $personal_options, 1); // Remove the "Biographical Info" field
 return $personal_options;
}
function wordpress_profile_subject_start() {
 ob_start('wordpress_remove_user_personal_options');
}
function wordpress_profile_subject_end() {
 ob_end_flush();
}
// Hooks.
add_action('admin_head', 'wordpress_profile_subject_start');
add_action('admin_footer', 'wordpress_profile_subject_end');

Before Removing Profile Options: 

Plugins Reviews remove personal options section in WordPress

After Removing Profile Options: 

Plugins Reviews remove personal options section WordPress

If you need to add social media on the profile page of WordPress you can read my Article(How to add Social Media in Profile Page)

If you liked my article don’t forget to share it and like my Facebook Page for the latest WordPress Tutorials. You can also join my Newsletter for the latest updates. 🙂

  • 3
    Shares

1 thought on “How to Remove Personal Options section from Profile Page”

  1. ScottyGTheWebmaster

    Thanks for this … If you want to remove the “Admin Color Scheme” section you can do this:

    remove_action('admin_color_scheme_picker', 'admin_color_scheme_picker');

Leave a Comment

Your email address will not be published. Required fields are marked *