so how did you create a custom forum role?
Hi Robin,
My apologies, I’d said it was User Role Editor. It wasn’t, I used the Members plugin. Unfortunately, I can’t provide a link as everything is behind a login but here is my Members admin page. You can see the additional member roles I created.
All that said, however, I am wondering if this is a theme update that caused this. Previously I’d themed my forum to display this user role, not bbp-author-role, so it is possible this was over-written by a theme update instead (my theme includes bbpress). Honestly, it’s been over four years since I styled my forum so I’m clutching at straws here, but is there any way your plugin could have over-written any custom code I wrote?
I think if I add this to my child functions file I may be able to re-introduce the forum role:
$bbp_roles['oyster-owner'] = array(
'name' => 'Oyster Owner',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
);
Sorry, forgot the function and end part.
function add_custom_role( $bbp_roles ) {
$bbp_roles['deckhand'] = array(
'name' => 'Deckhand',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
);
$bbp_roles['admiral'] = array(
'name' => 'Admiral',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
);
return $bbp_roles;
}
add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
And the more I think about it, the more I think this was either something I have over-written in the past, or a feature I had another website, not something your plugin has done. On another website I use the pro version of User Role Editor and I think that is how I am able to force custom forum roles. I think the code I posted above relates to this plugin.
That all seems to make sense, I’ll ignore this for the moment 🙂