Tuesday, March 19, 2013
0
Tuesday, March 19, 2013
Unknown
How to Highlight Author Comments in Blogger
Commenting most important in blogger as the main way of reaching the visitors to extent as reply is another one as we all bloggers will do.For that we had already shared the threaded comments for blogger for this visitors want to differentiate the comments from authors differently.Now we share to customize author comments by just applying CSS codes.
That's it you have done all now save the template. Have any problem comment below.
Back up your template before proceeding further
Adding Author Comment CSS code to Blogger Template
- Log in to Blogger.
- Then edit Template and click proceed.
- Then search for ]]></b:skin>
- Then above that add below code.
.comment-body-author {Change the background and border color as per your blogger template.
background: #CEF6E3;
border: 2px solid #FA5858;
padding: 5px;
}
Adding Author comment XML code to Blogger Template
Now we want to differentiate the author comment and visitors comments so we use If conditional statement for this can be done by adding the below xml code to template.
- Now search for <data:comment.body/>
- Then copy that block of if code that will look like below 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>
- Then replace the above block of code with the below code.
<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>
That's it you have done all now save the template. Have any problem comment below.
Related Articles :
Do you like this article? Spread the words!
If you enjoyed this post, please consider leaving a comment or subscribing to the E-mail feed to have future articles delivered to your feed reader.
Subscribe to:
Post Comments
(
Atom
)
0 Responses to “ How to Highlight Author Comments in Blogger ”
Post a Comment