Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove website fields from Add User Page in wordpress admin panel?

Its getting impossible for me now to remove website field from wordpress dashboard Add User page. Someone please suggest something??

like image 389
Balram Singh Avatar asked Nov 29 '25 15:11

Balram Singh


2 Answers

Maybe this can help you:

function hide_website_krotedev(){
  echo "\n" . '<script type="text/javascript">jQuery(document).ready(function($) {
    $(\'label[for=url], input#url\').hide();
  }); 
  </script>' . "\n";
}
add_action('admin_head','hide_website_krotedev');
like image 62
kroteDev Avatar answered Dec 02 '25 07:12

kroteDev


If you want to remove the Twitter field in the user profile then you should add the following code to your functions.php file.

function modify_contact_methods($profile_fields) {


    // Remove profile fields
    unset($profile_fields['twitter']);

    return $profile_fields;
}
add_filter('user_contactmethods', 'modify_contact_methods',10,1);

Unfortunately there's no easy way to remove the Website field at this time, you can always hide it with jQuery but that's a bit messy of course.

I hope that helps, also check out the stackexchange website for WordPress questions here: http://wordpress.stackexchange.com

like image 27
user2019515 Avatar answered Dec 02 '25 07:12

user2019515