How to allow an user role to create a new user under a role which lower than his level only?

I have three extra roles in my site. Doctor Receptionist Guest those roles are added by following code: * adding Doctor role */ $doctor_role = add_role(‘Doctor’, __(‘Doctor’), array(‘read’=>’true’)); /* adding Receptionist role */ $receptionist_role = add_role(‘Receptionist’, __(‘Receptionist’), array(‘read’=>’true’)); /* adding Guest role */ $guest_role = add_role(‘Guest’, __(‘Guest’), array(‘read’=>’true’)); By default Administrator role create all other … Read more

Possible to hide Custom Post Type UI/Menu from specific User Roles?

What I’m looking to do is completely hide the UI for a custom post type from specific user roles…Ive previously found many resources on how to disable access to using those CPTs but nothing that really allows you to completely hide the CPT UI all together based on what user is logged into the dashboard. … Read more