Skip to:
Content
Pages
Categories
Search
Top
Bottom

Theme color Issue with the roles.


  • akira010203
    Participant

    @akira010203

    Hello,

    I got an issue while trying to put a background color under the role name on my forum.

    I added this to my function file :

    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 this into my css file :

    #bbpress-forums .participant .bbp-author-role {
      background-color: blue;
    #bbpress-forums .keymaster .bbp-author-role {
      background-color: red;
    #bbpress-forums .moderator .bbp-author-role {
      background-color: green;

    But it only works with the participant role. Maybe I’m not using the correct keymaster and moderator role name. Is someone already did that and can help me to sold it out ?

    Thanks!

Viewing 1 replies (of 1 total)

  • akira010203
    Participant

    @akira010203

    I found out where is the problem.

    It is due to the language translation file, If I put the default language back in english there is no problems.

    To the french users if you get this issue try :

    #bbpress-forums .administrateur .bbp-author-role {
      background-color: blue;

    It will wrk but when it comes to the french translation of moderator : modérateur it will be harder due to the special character on it.

    You will have to rename it before being able to change color.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar