Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Add/Change User roles

@sbskamey

Participant

Ahh, that’s brilliant. It works! Thanks so much! You’re a god!

My last question is about changing the background colours. I’m using your code:

function rk_show_role_classes($classes) {
    $replyid = bbp_get_reply_author_id();
    $bbp_get_role = bbp_get_user_display_role($replyid);
    $bbp_display_role = strtolower($bbp_get_role);
	  
  
	$classes[] = $bbp_display_role;
	return $classes;
}
add_filter( 'bbp_get_topic_class','rk_show_role_classes' );
add_filter( 'bbp_get_reply_class','rk_show_role_classes' );

and added in some css, like you said:

.communitymember .bbp-author-role {
  background-color: blue;
}

This may seem like a basic question, but am I suppose to amend your code in any way? If so, I have tried multiple variations of it (logic guess work), and a few variations of css, with no luck.

Please could you guide me as to what I need to change on your code to get it to work?

Thanks again,
Kam

Skip to toolbar