• Hey,

    I’m building a multi-author blog, and I’d like each user role to have its own background color
    I would like them to have different background colors by specific role, for example –

    Aministator – Red
    Moderator – Green
    Customer – Blue
    guest – Orange
    Blocked – Black

    Is it possible?

    With the function here or with your plugin

    // Noms de r?le personnalisés
    add_filter( 'bbp_get_dynamic_roles', 'ntwb_bbpress_custom_role_names' );
    
    function ntwb_bbpress_custom_role_names() {
    	return array(
    
    		// Keymaster
    		bbp_get_keymaster_role() => array(
    			'name'         => 'Admin',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    		),
    
    		// Moderator
    		bbp_get_moderator_role() => array(
    			'name'         => 'Modérateur',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    		),
    
    		// Participant
    		bbp_get_participant_role() => array(
    			'name'         => 'Client',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    		),
    
    		// Spectator
    		bbp_get_spectator_role() => array(
    			'name'         => 'Invité',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    		),
    
    		// Blocked
    		bbp_get_blocked_role() => array(
    			'name'         => 'Bloqué',
    			'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    		)
    	);
    }

    thank you,

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    This question is more related to a custom bbPress theme development, than to a User Role Editor itself. Look how write a custom theme for bbPress, check there a current user role and define appropriate background color value according to that role.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom background color for different user roles’ is closed to new replies.