Hide user fields based off capability

This filter needs to return something. Try this function modify_contact_methods($profile_fields) { if(current_user_can(‘edit_users’)) { // Field addition and removal will be done here // Add new fields $profile_fields[‘company_name’] = ‘Company Name’; $profile_fields[‘company_id’] = ‘Company ID’; } return $profile_fields; } add_filter(‘user_contactmethods’, ‘modify_contact_methods’);

Variable undefined but it is defined

Your problem is totally related with pure PHP, not WordPress. You must understand that includes DO NOT break the variable scope. So, the $curauth is only life in author_list.php file and, more specifically, only life inside the foreach($author_ids as $author) loop of that file. In your page template you could use the_author_meta() to get the … Read more

Manage user profiles with WordPress

As you are going to enter all data by yourself you can make use of Custom Post Types. Create 3 CPTs for each user type, Trustee, Alumni, Scholar. And with that create custom fields as per your need for each CPT. Once all data is in, then you need is to create Custom Page templates … Read more