Home / admin / Remove personal options from user profiles
  • Remove personal options from user profiles

    remove-personal-options-from-user-profiles

    Adding this snippet to the functions.php of your wordpress theme will remove the personal options from users profiles.

    ( example screenshot )

    wordpress snippet : PHP

    <>
    function hide_personal_options(){
    echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) { $(\'form#your-profile > h3:first\').hide(); $(\'form#your-profile > table:first\').hide(); $(\'form#your-profile\').show(); });</script>' . "\n";
    }
    add_action('admin_head','hide_personal_options');
    

    ( WordPress codex functions, hooks, in this snippet. )

    query, admin_head, add_action, wp,
  • Pingback: How to Simplify WordPress Profiles By Removing Personal Options()

  • Anonymous

    It works nicely. However, it would be great to allow certain user  groups (like the admin) to have their full options show. 

    • nonato

      if ( !current_user_can( ‘administrator’ ) ) {
      add_action(‘admin_head’,’hide_personal_options’);
      function hide_personal_options(){
      echo “n” . ‘jQuery(document).ready(function($) { $(‘form#your-profile > h3:first’).hide(); $(‘form#your-profile > table:first’).hide(); $(‘form#your-profile’).show(); });’ . “n”;
      }
      }

  • pestwave

    it works, thanks

  • DevilishData

    This doesnt work for me

    • http://wpsnipp.com Kevin Chard

      Just tested this in 3.8 and it works perfectly as expected.

  • Bloke

    Any idea why I get the white screen when using this? I just want to remove the More information link to wp from the profile? Thanks

Build a better with wpsnipp.com

Weekly snippets, themes, deals coupons roundup.

x No Thanks