Highlighting admin comments only
-
that callback is integrating
<?php comment_class(); ?>which might output comment author specific css classes;http://codex.ww.wp.xz.cn/Function_Reference/comment_class
try and use a browser inspection tool such as Firebug http://getfirebug.com/ to investigate what css selectors are output with the individual comments.
if you need help with checking, please post a link to a post or page with at least one admin comment.
Thanks for the reply. I see the issue in firebug but, I’m just not sure how to fix it.
All the li tags have a class of this:
<li id="li-comment-8" class="comment byuser comment-author-admin odd alt thread-odd thread-alt depth-1">In the class for all the user comments it’s showing up as comment-author-admin when it should be comment-author-“the user_id”
Any clue on how to fix this?
I would post a link but can’t due to confidentiality issues.Thanks
highlight just the admin comments
that should be possible with the existing comment_class output; unless there is more than one user with admin capabilities.
In the class for all the user comments it’s showing up as comment-author-admin
might be a interference with some plugins;
what theme are you using?
when it should be comment-author-“the user_id”
to get this output, you possibly need to add a filter function for ‘comment_class’ – http://codex.ww.wp.xz.cn/Plugin_API/Filter_Reference
Oh man, I just figured it out.
It was actually working fine, but when I entered the posts and comments into the database manually I forgot to change the user_id’s from mine to the corresponding member’s, so that’s why they were all showing up as comment-author-admin.
Everything is working good now. Thanks for the help and sorry that I wasted your time.
Mike
The topic ‘Highlighting admin comments only’ is closed to new replies.
(@dying2live)
13 years, 7 months ago
I’m trying to highlight just the admin comments in the comments list. I’ve tried a bunch of tutorials and I’ve had no luck. If someone could help/point me in the right direction it would be greatly appreciated.
In the comments.php file I’m calling wp_list_comments
This is my function in the functions.php file:
Thanks in advance,
Mike