Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Add/Change User roles

@robkk

Moderator

Create new roles with custom capabilities.

Custom Capabilities

TO have individual colors for each role, there is a function that might help. I think you need to create a varialbe to pass the bbp_get_user_display_role() with the id of the user in the reply author bbp_get_reply_author_id() to get the specific user role of the reply author then pass the user role name into $classes. You might also need to use strtolower() to make the class in your code lowercase.


function my_reply_class($classes) {
	$classes[] = 'test-class';
	return $classes;
}
add_filter( 'bbp_get_reply_class','my_reply_class' );

After all that, all you would need to do is add this CSS.

.myrole .bbp-author-role {
  background-color: blue;
}
Skip to toolbar