• 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)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Please don’t bump your posts.

    How are you adding pink bubbles?

    Thread Starter Belle224

    (@belle224)

    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.

    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.

    Thread Starter Belle224

    (@belle224)

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

    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 https://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.

    Thread Starter Belle224

    (@belle224)

    Okay, no problem.

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

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

    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.

    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)

    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.

    Thread Starter Belle224

    (@belle224)

    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.