Don’t edit core files. Examine the classes in the generated list of comments and style on them.
I understand. But then my problem becomes that the generated list does not create one for all comment authors who are admin.
Is there another way I should look into?
what is the code of comments.php of your theme?
does it use ‘wp_list_comments()’?
http://codex.ww.wp.xz.cn/Function_Reference/wp_list_comments
does it use a custom callback function?
if so, what is the code of that function?
if not, you can create one –
see for example how it is done in Twenty Ten.
Hi alchymyth,
Really weird, but I found the answer, which incidentally was from a post you had answered previously as well. Amazing! Much thanks!
Thanks for the advice as well, esmi!
http://ww.wp.xz.cn/support/topic/special-comment-color-for-specific-role
(@gingerngo)
14 years, 11 months ago
Hi all,
I am trying to create a specific class for admin comments, so any comments by any admin on my site is a different colour. There are about 12 different users with admin roles, so I’m not quite sure how to proceed.
My current idea is to go into wp-includes/comments-template.php.
Right now, the code is generating a class “comment-author-*nicename*”.
[Code moderated as per the Forum Rules. Please use the pastebin]
Any advice would be much appreciated.
Some links that I’ve referred to:
http://codex.ww.wp.xz.cn/Function_Reference/comment_class
http://www.garyc40.com/2010/04/ultimate-guide-to-roles-and-capabilities/#highlighter_709509
http://codex.ww.wp.xz.cn/Roles_and_Capabilities
http://codex.ww.wp.xz.cn/Function_Reference/comment_author