Hi P1NK. Can you post a link to your site so we can see the problem? Thanks.
Thread Starter
P1NK
(@p1nk)
hi bdbrown
unfortunately i’m working in local! 🙁
This post provides some information on linking your admin email address with your gravatar. Or you could use the WP User Avatar plugin.
Thread Starter
P1NK
(@p1nk)
thanks bdbrown
–
but, is there anyway highlight for example only three user comment?
Sorry, maybe I misunderstood what you were asking. I thought you meant you were trying to get the avatar for the admin user. Are you trying to place a border around the entire comment? Or just some part of it?
Thread Starter
P1NK
(@p1nk)
thanks bdbrown for reply.
this theme has below code:
/* post author & admin comment */
.commentlist li.bypostauthor > .comment-body:after,
.commentlist li.comment-author-admin > .comment-body:after { background: #3b8dbd; display: block; position: absolute; content: "\f040"; color: #fff; line-height: 12px; width: 12px; font-style: normal; font-family: FontAwesome; text-align: center; }
.commentlist li.comment-author-admin > .comment-body:after { content: "\f005"; /* star for admin */ }
.commentlist li.bypostauthor > .comment-body:after,
.commentlist li.comment-author-admin > .comment-body:after { top: 32px; left: -28px; font-size: 10px; padding: 2px; -webkit-border-radius: 3px; border-radius: 3px; }
.commentlist li li.bypostauthor > .comment-body:after,
.commentlist li li.comment-author-admin > .comment-body:after { top: 22px; left: -26px; font-size: 8px; padding: 1px; -webkit-border-radius: 2px; border-radius: 2px; }
that code insert star icon for admin username but another admin don’t have star icon on their avatars.
i need some code for highlight other admin comment
The fontawesome icons are set using css, as you’ve shown, based on the comment classes. These classes are assigned by the WP core file “comment-template.php” when it processes the output from the wp_list_comments function. I did a little testing and, based on my totally unscientific findings, the fontawesome icon is not based on the user role. In fact, the only user I could get to display the star icon was a user with the username of “admin”, as you’ve indicated. So it appears that comment-template.php is comparing the logged on username to the comment author. If the username is “admin”, the class gets assigned and they get the star.
There are examples on the web (including the Codex) of functions that will modify and override the output from wp_list_comments. Or it may be that you just need to modify or add a function in comment-template.php that returns the user’s role, and then generate a class based on that, but I didn’t have time to dig into it that far. Sorry I don’t have an easy answer for you.
Thread Starter
P1NK
(@p1nk)
thanks bdbrown
i will work on it 🙂