Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Add forum roles

@janhoos

Participant

Hi Blg002,

It worked for me! Added it to the theme functions and changed the function to add in 3 more roles.

Can probably optimise it but it works like this right now:

function add_custom_role( $bbp_roles ) {
$bbp_roles[‘my_custom_role’] = array(
‘name’ => ‘ACN Lid’,
‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants

);
$bbp_roles[‘my_custom_role2’] = array(
‘name’ => ‘ACN Aspirant’,
‘capabilities’ => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants

);
$bbp_roles[‘my_custom_role3’] = array(
‘name’ => ‘ACN Lid admin’,
‘capabilities’ => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // i just want them to have the same capabilities as participants

);

return $bbp_roles;
}
add_filter( ‘bbp_get_dynamic_roles’, ‘add_custom_role’, 1 );

Skip to toolbar