Skip to content

Instantly share code, notes, and snippets.

@sareiodata
Last active August 29, 2015 14:06
Show Gist options
  • Save sareiodata/0d70d54e6167cddd7c44 to your computer and use it in GitHub Desktop.
Save sareiodata/0d70d54e6167cddd7c44 to your computer and use it in GitHub Desktop.
hide default edit profile fields in the backend
/*
* Hide Default Edit Profile Fields in the backend
*/
function wppb_hide_personal_options(){
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('form#your-profile > h3:first').hide();
$('form#your-profile > table:first').hide();
$('form#your-profile').show();
$("h3:contains('About Yourself')").hide();
$("label:contains('Biographical Info')").parents().eq(3).hide();
$("label:contains('Nickname (required)')").parents().eq(1).before("<h3>Custom Header</h3>");
});
</script>
<?php
}
add_action('admin_head','wppb_hide_personal_options');
function wppb_edit_contactmethods( $contactmethods ) {
unset($contactmethods['yim']);
unset($contactmethods['aim']);
unset($contactmethods['jabber']);
return $contactmethods;
}
add_filter('user_contactmethods','wppb_edit_contactmethods',10,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment