• Resolved kingteamdunet

    (@kingteamdunet)


    Hey,

    Change the color of individual role names bbpress

    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 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Robin W

    (@robin-w)

    If I have understood you correctly within the plugin there is

    dashboard>settings>bbp style pack>Forum Roles

    and for each role look for ‘Click to select the background color if required’

    Thread Starter kingteamdunet

    (@kingteamdunet)

    Hi,

    No, I’m talking about changing the color of the username
    I would like them to have different colors by specific role, for example –

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

    Is it possible?

    With the function here and for the bbpress plugin

    Thank you

    Plugin Author Robin W

    (@robin-w)

    so you want the username to be a different color or maybe the background to the username to be a different color.

    It is quite possible, but would need some specific coding, and outside of free help – sorry, wish I had the time to answer.

    Thread Starter kingteamdunet

    (@kingteamdunet)

    Yes, the username is a different color in the forum footer with the bbpress plugin
    Integrating your function into the function here?
    A function integrated on our function file of the child template
    without using plugin
    How much for the specific coding

    Plugin Author Robin W

    (@robin-w)

    contact me via my website

    http://www.rewweb.co.uk

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change the color of individual role names’ is closed to new replies.