Add a Comments Counter Button to Blogger Blogspot


In this Blogger tutorial (Blogspot tutorial) you will learn how to add a comments counter button to Blogger (Blogspot) to show off the number of comments each of your posts has received.

A comment counter button (bubble) will have the effect of encouraging visitors to comment on your Blogger blog and also help to highlight the credibility of your articles.


Installing this Blogger hack to add a comment counter button only takes a few minutes. The changes needed to add the comment bubble to Blogger while not difficult do involve adding a small snippet of code to your Blogger template in two places. For this reason I strongly urge you to back up your Blogger template before attempting this blogger hack.

Blogger Tutorial Difficulty - easy to medium


How to Add a Comments Counter Bubble to Blogger
A Step-by-Step Walkthrough
The following steps will insert a fully clickable comments counter button on the same line as the post title in Blogger. The comments counter is right aligned by default.

  1. Log in to Blogger and the blog you wish to apply these changes to
  2. Select Design > Edit HTML
  3. Click on Download Full Template to back up your template before you make any changes
  4. Check the Expand Widget Templates box
  5. In the CSS Styling section of your Blogger template and just before the ]]></b:skin>

    .comments-button {
    width : 48px;
    height : 48px;
    background : url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5ASEvKF1kd-gFTX4yd8jGMn94HZvhP8DIyggsjltSJK4EaPPgDEvf0XyjA8WE3onDyvAaTVS5WszdnAjkG8rSvjg-EEK5INLe-ISoSaFLUlkWn5pus8UpAePLKYfzMlnZ3ohlIdc7yb0e/s200/comment-counter-bubble.png) no-repeat;
    float : right;
    font-size : 18px;
    margin-top : -15px;
    margin-right : 2px;
    text-align : center;
    padding-top:10px;
    }
  6. Now find the following block of code using CTRL key + F

    <b:includable id='post' var='post'>
    <div class='post hentry uncustomized-post-template'>
    <a expr:name='data:post.id'/>
    <b:if cond='data:post.title'>
    <h3 class='post-title entry-title'>
    <b:if cond='data:post.link'>
    <a expr:href='data:post.link'><data:post.title/></a>
  7. Copy this code block:

    <b:if cond='data:post.allowComments'>
    <a class='comments-button' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:post.numComments/></a>
    </b:if>
  8. Insert as follows:

    <b:includable id='post' var='post'>
    <div class='post hentry uncustomized-post-template'>
    <a expr:name='data:post.id'/>
    <b:if cond='data:post.title'>
    <h3 class='post-title entry-title'>
    <b:if cond='data:post.allowComments'>
    <a class='comments-button' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:post.numComments/></a>
    </b:if>
    <b:if cond='data:post.link'>
    <a expr:href='data:post.link'><data:post.title/></a>
  9. Save template and then view blog to admire your new comment counter badge.