wordpress snippets last updated   : April 22, 2014
we now have 631 snippets

Remove personal options from user profiles

wordpress snippet

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

( example screenshot )
snippet :  PHPcopy
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');
source →
  • 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.

jqsnipp.com | we just launched jquery snippets website