Wednesday, April 24, 2013

Display post author, date, labels and comments with icons below post titles


In this tutorial I will show you how to add more info on your Blogger posts like blog author's name, a time stamp for published posts, labels and comment count links. Firstly, let's see how the comments link behave - when there are no comments on your posts, there would be a link that says 'Be the First to comment!' and if your post gets one comment, it will appear as '1 comment so far'. On the left side, we'll see the blog author's name, a clock showing when posts have been published and finally, the post labels.
If you want to make your blog more eye-catching by adding these details with some cute small icons along with the Blogger Author's Name, Post Date, Labels and Comments... then follow these steps below.

Screenshot:
labels below blogger posts

How to Add Author, Date, Labels and Comment Bubbles to Blogger


Step 1. From your Blogger Dashboard, select your blog > go to Template > Edit HTML


Step 2. Click anywhere inside the code area and press the CTRL + F keys to open the blogger' search box


Step 3. Type or paste the below code inside the search box in order to find it:
<div class='post-header-line-1'>
If you can't find the code above, look for this one:
    <div class='post-header'>
Step 4. After this code add the following HTML:
<div style="margin: 5px 0; border-bottom: 1px solid #F2F2F2;padding: 5px;"><font style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBsNshsf6ibLVwMUD9ETXIlt51fWFFwxSEC7qhlLUibTRHRPji1p1_MpDgkCeqW0ehIY33xpQhGPZCZI4fvHnMso0WJJAwgcCzOey9BVbwE_sgHB57XTHkraADMQR8x2WSclB3_rZoEirj/s1600/author.png) no-repeat scroll top left;padding-left:25px;font-size:11px;'><data:post.author/></font> | <font style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_O8uJPETMdRzbR_R62BwVtLjCwPqZhhSfDnclYxc95Snjh15tqElTLR6xW6CgCRnTMKjrD2jK-PxN95ScR7NV5HXXraW20GP7kD32mGNseObOkx7eFb629NpSnQxIZTKJR1sfpS0LrWFY/s1600/clock.png) no-repeat scroll top left;padding-left:25px;font-size:11px;'><data:post.timestamp/></font> | <font style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZTOG8oNRSAL1EONmQiG9d6HxrMnkCLDwzqKh4jG1Ap1bJcU5DmUspGGinkzBcB0o8gCdQ9uGB8EmEx2LOpvy15XFbdtIwOPbQUz6ufZU2LeQAgUZw1v-DZgwM7S0i7S85vV_J5l5saa0-/s1600/tag.png) no-repeat scroll top left;padding-left:25px;font-size:11px;'><b:if cond='data:post.labels'>
<b:loop values='data:post.labels' var='label'>
<a expr:href='data:label.url + &quot;?max-results=8&quot;' rel='tag'><data:label.name/></a>
<b:if cond='data:label.isLast != &quot;true&quot;'>|</b:if>
</b:loop>
</b:if></font>
    <span class='post-comment-link' style='Float:right;'>
        <b:if cond='data:blog.pageType != &quot;item&quot;'>
          <b:if cond='data:post.allowComments'>
            <a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick' style='background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihiuKVTCBpMzBXPwlR7rktBtdhqCHjzYWjOlGr2IhxtemK4ZI3jeUoxeIFUq-DFzo8dY2lEYO4bSQ1tBrojVG4ihWWI4khfnBhe1NdMmEPU3-1hBtv2Z83iyF4rBAFNwurdxxECVkiBLup/s1600/comment.png) no-repeat;padding-left:20px;font-size:11px;'><b:if cond='data:post.numComments == 0'>Be the first to comment!<b:else/> <b:if cond='data:post.numComments == 1'><data:post.numComments/> Comment so far<b:else/><data:post.numComments/> Comments so far</b:if> </b:if></a>
          </b:if>
        </b:if>
    </span></div>

How to customize:

If you want to change the icons, just replace the URL addresses in blue from above with your images URLs:

1. First one is the icon for the Author
2. 2nd one is the Clock icon
3. The 3rd one is the icon near the Labels
4. And the last one is for the comment bubble
Step 5. Save template... and you're done!

No comments:

Post a Comment