Question

I am building an education site, in that I want to add Teacher and Student as different user with some capabilities. I tried many times, but only default role is working. How can I assign different role for student and teacher....? Tried many plugin also... At the time of new user registration, the role can select.

I tried these also

/* Add member role to the site */
add_role('member', 'Member', array(
'read' => true,
'edit_posts' => true,
'delete_posts' => true,
));

/* Add snypher role to the site */
add_role('snypher', 'Snypher', array(
'read' => true,
'edit_posts' => true,
'delete_posts' => true,
 ));

/* remove the unnecessary roles */
remove_role('subscriber');
remove_role('editor');
remove_role('author');
remove_role('contributor');

Is it possibile to add multi role in wordpresss? How can hide the default role?

please help me..

Thanks...

Was it helpful?

Solution

Yes it is possible to create multi-role in WordPress. You can use User Role Editor for creating different roles with different capabilities.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top