The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to have diff Speech Bubble Images for Gravatar in Comments for Admin? (11 posts)

  1. Belle224
    Posted 5 years ago #

    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.

  2. Please don't bump your posts.

    How are you adding pink bubbles?

  3. Belle224
    Posted 5 years ago #

    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.

  4. Michael
    Forum Moderator
    Posted 5 years ago #

    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.

  5. Belle224
    Posted 5 years ago #

    Sorry, my site is under construction and has is password protected, sorry for the inconvenience. However, here is the 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.

  6. Michael
    Forum Moderator
    Posted 5 years ago #

    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.

  7. Belle224
    Posted 5 years ago #

    Okay, no problem.

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

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

  8. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    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.

  9. Michael
    Forum Moderator
    Posted 5 years ago #

    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)

  10. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    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.

  11. Belle224
    Posted 5 years ago #

    Thank you all for your help! :)

Topic Closed

This topic has been closed to new replies.

About this Topic