When you simply delete a comment on your Blogger blog you will see an message along the lines of „This post has been removed by the author“. This messages give your blogger blog a rather ugly appearance. But with the little trick I am going to show you in this post you can hide deleted comments easily. If you would like to hide all deleted comments on your Blogger blog, then simply follow the steps below.
How to hide deleted comments in Blogger
1. Sign in to Blogger, then go to Dashboard --> Layout --> Edit HTML.
2. Click on "Expand Widget Templates".
3. Search for (Ctrl + F) for the following line of code:
<b:loop values='data:post.comments' var='comment'>
<dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
<b:if cond='data:comment.favicon'><img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/></b:if>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'><data:comment.authorAvatarImage/></b:if>
<data:comment.author/>
<data:commentPostedByMsg/></dt>
<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>
<dd class='comment-footer'><span class='comment-timestamp'><a expr:href='data:comment.url' title='comment permalink'><data:comment.timestamp/></a><b:include data='comment' name='commentDeleteIcon'/></span></dd>
</b:loop>
4. Copy the code below and paste it immediately after <b:loop values='data:post.comments' var='comment'>.
<b:else/>
5. Copy the following code and paste it just before </b:loop>.
6. Save your template.
That’s all!
Good luck!











0 Comments:
Post a Comment