Yes it is possible to create multi-role in WordPress. You can use User Role Editor for creating different roles with different capabilities.
Is it possible to add multi role in wordpress?
-
23-07-2023 - |
質問
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...
解決
所属していません StackOverflow