Replace No Comments label with your own text in Blogspot Template

Remove no comment in blogger
By defaul, every blogger template comes with the No Comments or 0 Comments label if there is no comment on your blog post. The commenting system and a rumored Google+-based solution for sites, there are still some minor tweaks that can make Blogger comments work better on your blog or site. One thing that nagged me was the fact that below each article there is a rather big section dedicated to the number of comments – which is well and nice if there are comments, but completely useless on posts with none (I have a fair amount of those, as most casual bloggers do). So if you want to remove that part of the page with your own text or number, follow the steps in this article. This involves changes to the HTML template, so be sure to back it up first, just in case.

Note: After you done the below steps, your blogger post will show the text that you want to display (In case of if there is No comment) But if your blog post get comments, your customized text will automatically disappear and it will show the number of comments for the same post. 

In the new dashboard go to Template > Edit HTML, and  ‘Expand Widget Templates’. Here search for the following block of code:


                             <b:if cond='data:top.showTimestamp'>
                            <b:if cond='data:post.url'>    
                               <span class='time-info'>
 <i class='fa fa-clock-o'/> <a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'>
<abbr class='published updated timeago' expr:title='data:post.timestampISO8601'><data:post.timestamp/></abbr></a>
 </span>
 </b:if>
 </b:if>
                          <b:if cond='data:post.allowComments'>
                         <span class='comment-info'>
 <i class='fa fa-comments'/> <a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
<b:if cond='data:post.numComments == 0'> No Comments </b:if>
 <b:if cond='data:post.numComments == 1'>1 Comment</b:if>
<b:if cond='data:post.numComments &gt; 1'><data:post.numComments/> Comments</b:if> </a> </span>
 </b:if>
                               <b:if cond='data:post.labels'>
                              <span class='label-info'>
                             <i class='fa fa-tags'/>
 <b:loop values='data:post.labels' var='label'>
 <a expr:href='data:label.url + &quot;?max-results=5&quot;' rel='tag'>
<data:label.name/>
</a>
<b:if cond='data:label.isLast != &quot;true&quot;'/>


Now replace the blue colored text  'No Comment' with your own message like "Speak your words", "Hit me with a comment" etc.
Subcribe to Our Newsletter For Free

Subscribe Now

Recommended For You

1 comment:

  1. i was looking for this tutorials. thank you

    ReplyDelete