A Technology blog that provides tips on Android, iPhone, Social media, Ubuntu and other web product and services.

How to Highlight Blog Author Comments in Blogger?

Do you see your own comments hidden with other comments on your blog?  What if you want to highlight your own comments and let your readers know quickly what have you responded?  Will not it be cool?
I am providing below a copy and paste type of method, which I am sure should work with all the Blogger blogs.
Also I am highlighting the part which I have modified so if you know a little bit of CSS, you might want to modify your template yourself.  So here it goes:
  1. First and foremost, BACKUP your template.  Don’t held me responsible if something goes wrong.
  2. Now Expand widget templates.
  3. Add the following styling code just before the ]]></b:skin> code:

    .blog-author-comment {
    margin: 5px 0px 5px 0px;
    padding: 5px 5px 5px 10px;
    color: #000000;
    border:0px solid #121605;
    background:#c7da45;
    }

  4. Search for <dd class=’comment-body’>
  5. The code which is to be replaced is:

    <dd class=’comment-body’>
    <b:if cond=’data:comment.isDeleted’>
    <span class=’deleted-comment’><data:comment.body/></span>
    <b:else/>
    <p><data:comment.body/></p>
    </b:if>
    </dd>

  6. Just highlight the code mentioned in Step 5 above and replace it with the following:

    <b:if cond=’data:comment.adminClass == data:post.adminClass’>
    <dd class=’blog-author-comment’>
    <p><data:comment.body/></p>
    </dd>
    <b:else/>
    <dd class=’comment-body’>
    <b:if cond=’data:comment.isDeleted’>
    <span class=’deleted-comment’><data:comment.body/></span>
    <b:else/>
    <p><data:comment.body/></p>
    </b:if>
    </dd>
    </b:if>

  7. You should preview it before saving, so that it shows you any code/HTML errors.  If there are no errors, save your template.
  8. View any post on your blog with your own comments on it.  You should see your comments highlighted in there.
  9. You may play around with color codes in Step 3 to match it with your theme.
  10. As an example of how you would see it, see the image above.
Let me know if it works for you.  Was it easy enough to highlight your own comments?  Did you face any issue in modifying your template?  If not, enjoy your blog with highlighted author comments.
By the way, Amanda on BloggerBuster has a similar tutorial, but I found it a little hard to follow.  You might want to check it out too.
Update 1: Modified Step 6 as per the recommendation from techniqueal t. in comment # 8.  Thanks techniqueal t. for the suggestion.

Related Posts

View Comments to “How to Highlight Blog Author Comments in Blogger?”

  1. How to Highlight Blog Author Comments in Blogger?: Do you see your own comments hidden with other comment.. http://tinyurl.com/62p9bh

  2. franco says:

    lindo blog

  3. Anurag Bansal says:

    @Franco:
    Thanks for the feedback. I was gonna assume it to be a spam. I didn’t know what ‘lindo’ means. I had to search for the meaning.
    As per Wikipedia,
    ‘Lindo is also an adjective in the Spanish and Portuguese languages, meaning pretty, attractive, nice, pleasant, clean.’

    Cheers,
    Anurag Bansal

  4. Missy says:

    Cool hack. I had no problems with it. Just wondering how to get the author’s name and the time stamp included in the colour block.

  5. Anurag Bansal says:

    @Missy,
    Thanks for the comment.
    Why would you want to include Author name and date in the colour block?

  6. Missy says:

    I was just interested to see how it would look.

  7. techniqueal t. says:

    your code works like a charm! real easy to follow. =)

  8. Anurag Bansal says:

    Oh, that’s great. Your template is very good in fact.
    You might wanna change the background color of your own comments to say something in Blue matching with your theme. But yes, current background is also OK.
    Just a thought.

    Cheers…

  9. techniqueal t. says:

    Followed your suggestion, it indeed looks better. Thanks! =)

    One quick tip: to avoid confusion in case the commentor also has the same name as the author, you may change this part of the code:

    b:if cond=’data:comment.author == data:post.author’

    to

    b:if cond=’data:comment.adminClass == data:post.adminClass’

    again, great hack!

  10. Anurag Bansal says:

    Checking to see if the code shows this comment highlighted when I use my name and different details.

  11. Anurag Bansal says:

    Yes indeed it highlights the comment, changed the code to avoid confusion.
    Thanks techniqueal t. for highlighting the catch.
    I appreciate it.

  12. techniqueal t. says:

    thanks for the mention! =)

  13. Adrienne says:

    I have tried this and every possible similar article and CANNOT get it to work. I’m to the point that I’d rather have someone login and change it for me HELP!!!

  14. Anurag Bansal says:

    @Adrienne:
    I checked one of your blog at following link:
    http://dingbatpress.blogspot.com/2008/09/temptation-winner-giveaway-at-3pm.html
    And it does show me author comment highlighted.
    Actually I think what you might be seeing is the comment highlight when you click on # of comments in the footer of your post that open a pop-up window. That window is default blogger comment system which you can’t modify.
    To see your highlighted comment you need to click on the Permalink of your post.

    As you have followed the guideline mentioned here, I do see your comment highlighted in green color.

    Let me know if you still have some doubt. I will be more than happy to help you out.

    Thanks
    Keep reading KNOWLIZ.

    Cheers
    Anurag Bansal

  15. Sama says:

    This just isn’t working for me, neither is Amandas version (even though the template is hers from the beginning).
    I can’t find anything that resembles what you say I should replace…

  16. Anurag Bansal says:

    @Sama:
    If you are using the Blogger template, even highly modified, you should see the code mentioned.
    Try harder my friend…

    Cheers
    Anurag Bansal

  17. Matt says:

    Thanks for this! But I do have to say you probably picked the ugliest color scheme. lol ;)

  18. Phoo-D says:

    After unsuccessfully trying other ways to do this, your steps worked like a charm! Thank you so much. I’ve been wanting to do this for months now.

  19. Anurag Bansal says:

    You are very welcome my friend.
    Glad to have helped.

    Cheers
    Anurag Bansal

  20. Radith Prawira says:

    TQ very much. your trick worked!

    but i'd like to give a little thought here, in step 5 & 6, there's a wird replaced which make me a little confused, maybe it should written as "added" ( or something like that )? since i have first replaced the code ( <dd class='comment-body'>
    <b:if cond='data:comment.isDeleted'>
    <span class='deleted-comment'><data:comment.body/></span>
    <b:else/>
    <p><data:comment.body/></p>
    </b:if>
    </dd> ) instead of adding it with the new code

    well, forget about it, maybe it's me who just too dumb to understand it, hehehe

    keep up the good work :)

  21. Radith Prawira says:

    *i mean word not wird, , my mistake >_<

  22. Nostalgia says:

    Very interesting information :-D I have one more question regarding this topic.. I did enter the code for the owner highlight and it works perfectly but one issue that the avatar of the people who comment no longer shows up in the comment page!! how can I use both.. my comment highlight and the picture of other blogger who comment on my post?

    Thank you in advance

  23. pigpigscorner says:

    Hi! Thanks for this! But I have 2 authors for my blog and this only highlights my comments. How do I highlight the other author’s comments as well? Thanks.

  24. Anurag Bansal says:

    @pigpigscorner:
    That’s a nice question my friend.
    What I think with the method I mentioned above, the comment should be highlighted for the one who wrote the blog post. So if you wrote it, your comment will be highlighted and if the other author, then his.
    Can you send me your full template so that I look for the code and do proper modifications to the code so that it supports multiple author blogs too?

    Thanks
    Anurag Bansal

  25. Mr_Nick says:

    So much thanks. This hack is great. :)

  26. Mr_Nick says:

    Just one question, Anurag.

    I see that the text inside your comment block is perfectly aligned vertically and orizontally.

    If I keep this values:

    margin: 5px 0px 5px 0px;
    padding: 5px 5px 5px 10px;

    I like the distance of text from higher and left margin of my "box" but I don't like the distance of text from left and lower margin.

    What can I do to have the same alignement that your comments have?

    I don't know how to modify values. I tried to do some change but it was unsuccesful.

  27. jeniliathiruve says:

    Nice ..Interesting article..I am using the Unlocked Nokia Mobile

  28. Sandip says:

    Thanks

  29. हिम्मत नहीं पड़ रही कोड बदलने की?

  30. अगर आपको अपने विचार अलग से दिखाने हैं तो कोड बदले बिना तो काम नहीं चलेगा. दूसरा उपाय तो केवल plugin है जो ब्लॉगर में अभी उपलब्ध नहीं हैं.
    धन्यवाद्

  31. धन्यवाद!

    सादर
    आपका
    प्रवीण त्रिवेदी ╬

  32. हिम्मत नहीं पड़ रही कोड बदलने की?

  33. अगर आपको अपने विचार अलग से दिखाने हैं तो कोड बदले बिना तो काम नहीं चलेगा. दूसरा उपाय तो केवल plugin है जो ब्लॉगर में अभी उपलब्ध नहीं हैं.
    धन्यवाद्

  34. धन्यवाद!

    सादर
    आपका
    प्रवीण त्रिवेदी ╬

  35. viru12 says:

    nice article bro

  36. Hamza Ahmed says:

    Hey thanks it was a great trick!!!

  37. Hamza Ahmed says:

    Hey thanks it was a great trick!!!

Leave a Reply





blog comments powered by Disqus