Changing Username Color Depending On User Role

1 replies
I am working on a site that's running the latest version of Wordpress. I have multiple users that are assigned to different User Roles (contributor, author, admin, etc.). I'm looking for a way to change the color of a user's name when it is displayed. I'm currently using the function <?php the_author()?> to display the user's name. I would like to have a different color for each level of user. Is there something simple that I may be overlooking? I've been searching and surprisingly enough haven't found anything. Thanks guys.

Bonus Question: Does anyone know of a good tutorial for editing the WP admin area? I've found some tutorials, but they were fairly old.
#changing #color #depending #role #user #username
  • Profile picture of the author cristiro
    There is not built-in function for that, but I can develop a plugin for that, if you want. I can make it when you use the_author() function, to get it colored, so you don't have to rewrite your code, just install the plugin and activate it.

    If you're interested, hit me up with a PM.
    {{ DiscussionBoard.errors[6275237].message }}

Trending Topics