Wordpress - Is it possible to add new user Roles?

Yes. WordPress has robust built-in Roles and Capabilities system desgined to do exactly what you are looking for.

To add a new role, use the add_role() function in your theme's functions.php or a plug-in like so:

$role = add_role( 'event_manager', 'Event Manager', array(
    'read' => true, // True allows that capability
) );

if ( null !== $role ) {
    echo 'Yay!  New role created!';
} else {
    echo 'Oh... the event_manager role already exists.';

}

To add a new capability, use the add_cap() function like this:

$role = get_role( 'event_manager' );
$role->add_cap( 'manage_events' );

Yes, definitely possible with a plugin like Members. You can create new roles and capabilities, but remember - you'll actually need inject these custom capabilities into your plugin. What you may want to do is just install the plugin and then modify the existing contributor role to suite your needs.

For really granular control, you could bundle that with the Role Scoper plugin as well. Thanks!

Tags:

User Roles