How to Highlight Author Comments

Monday, December 7, 2009


Today I will be showing you how to highlight author comments on your blog and differentiate your comments from those of your visitors. Let your author status be known and stand out!

Step 1:


Log in to Blogger.
Click "Layout"




Step 2:


Once in Layout,
Click "Edit HTML"



Step 3:


Once under
Edit HTML,
expand widget templates



Step 4:
Hit CTRL + F in your web browser, and find the following code:
</head>



Immediately above that line of code, add the following:
*Feel free to customize the values to suit your needs*

<!--Blog-Author-Comment-Styling-STARTS-->

<style>

.comment-body-author {

background: #F5EDE3; /*Background color*/

color: #000000; /*Text color*/

border-top:2px solid #002F66;

border-bottom:1.2px dotted #002F66;

border-left:1.2px dotted #002F66;

border-right:2px solid #002F66;

line-height: 2.4em; /*Space Between Lines of Text*/

margin:0;

padding:0 0 0 20px; /*Position*/

}

</style>

<!--Blog-Author-Comment-Styling-STOPS-->



Step 5:
Now You will need to find the following code and add the sections in green:

<data:commentPostedByMsg/>

</dt>


<b:if cond='data:comment.author == data:post.author'>

<dd class='comment-body-author'>

<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>


Save your work. Your author comments should now be highlighted!

7 comments:

Scrappy Gifts said...

wow that's pretty cool and very helpful!

Scrappy Gifts said...

well I tried it and didn't work, but I have the "numbered comments" html stuff which is near step 5, right in between "data:commentPostedByMsg/"

"/dt"

so maybe that messed me up.

Jessica said...

Scrappy Gifts: That could explain why I can't get the numbered comments to work on my own blog! Thanks for the heads up. HTML is such a headache even for the "professionals."

Scrappy Gifts said...

yeah it is tough...for now I guess people can choose numbered comments or author highlight...

K. Rock said...

I couldn't get it to work. Is the code finicky enough to be picky over the spacing? That is the only thing I think it could be.

Diana said...

I can't get this to work right on my blog. I got a box to show up but can't get a highlighted author comment box. Any ideas?

Diana said...

I GOT IT! Changed some of my coding that should have already been there and wasn't exactly as shown here. Once I did that, so that all matched (the black AND green text in the tutorial) the highlighted comments work perfectly!

Thanks so much for this. I've been wanting to know how to do this for a LONG time! =)

Post a Comment