WordPress.org

Support

Support » How-To and Troubleshooting » How to have diff Speech Bubble Images for Gravatar in Comments for Admin?

How to have diff Speech Bubble Images for Gravatar in Comments for Admin?

  • Hi, behind my gravatars in the comments, I’m adding speech bubble images. For the normal commenters I have a pink speech bubble, and for the admin I want it to be a blue speech bubble. How would I code this? And where would I put this in comments.php?

    Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Please don’t bump your posts.

    How are you adding pink bubbles?

    For the bubbles, I added something in the CSS, and placed the div right before the avatar and changed the margins so it’d be positioned where I wanted it to be. It only shows one bubble, but I don’t know how to code it like so the Admin comment would have a different colour bubble.

    Moderator Michael

    @alchymyth

    Forum Moderator

    have you checked if your template already provides a css class for admin commenters?

    twenty ten for instance outputs: .comment-author-admin
    this can possibly be used in connection with your css to style the bubble.

    if you have problems finding out, please post a link to your site.

    Sorry, my site is under construction and has is password protected, sorry for the inconvenience. However, here is the theme:
    http://skechie.com/themes/wordpress-themes/girly-cloud-nine-theme

    I’ve looked and I’ve found this .author-comment
    I have tried doing this, but it wouldn’t work because that’s what I use to position the like actual comment box w/ margins, and I want the speech bubble image to be around the gravatar.

    Moderator Michael

    @alchymyth

    Forum Moderator

    as you have modified the comment area, a link to the theme won’t help much.

    you could copy the html code of a post with admin comments from the browser ( ‘view’ ‘source’ ) and paste it into a http://pastebin.com/ and post the link to it here.

    there might be enough info in there to make some suggestions to solve your problem(?)

    however, genral, with a css/formatting question, there is no other way than looking at the live site.

    Okay, no problem.

    Admin Comments in browser – http://pastebin.com/nbfyfH1B

    Comments.php file – http://pastebin.com/mfP7ZKjQ

    Chip Bennett

    @chipbennett

    Theme Review Admin

    For custom styling for an Admin, you have to do some custom functions.

    On the other hand, for custom styling for an author comment, you simply need to target the .bypostauthor class.

    Moderator Michael

    @alchymyth

    Forum Moderator

    line 9 of the comments in the browser:

    unfortunately, the theme only puts a css class .author-comment out:

    <div id="comment-35" class="author-comment"><div id="speech">....

    if the commenter is the post author.

    (it does not check for admin)

    Chip Bennett

    @chipbennett

    Theme Review Admin

    That code in your comments.php file is WAY old.

    Try using wp_list_comments() to output your comments, and comment_form() to output your comment reply form.

    See TwentyTen for an example.

    Thank you all for your help! 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to have diff Speech Bubble Images for Gravatar in Comments for Admin?’ is closed to new replies.