Display post author, date, labels and comments with icons below post titles - My Blogger Market

Breaking

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

2/27/2012

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

This tutorial will show you how to add more information in Blogger posts like author name, display the post date, post labels and comment count links. How does this work? The comment links will display the 'Be the first to comment!' text for posts with no comments and once we get a comment, it will show '1 comment so far'. On the left side, it will show the author name, a clock icon with date for posts published and finally, the post labels.


labels below blogger posts

How to Display Author, Date, Labels and Comment Bubbles in Blogger?

1. Login to your Blogger Dashboard > go to 'Template' and hit the 'Edit HTML' button:


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


3. Type or paste the HTML line below in the search box and press Enter two times to find the second occurrence of it:
<div class='post-header-line-1'>
Note: If you can't find the line above, look for this one:
<div class='post-header'>
4. After this line, add the following:
<div style="margin: 10px 0;"><span style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBdKyt1sSic91Fla89vHvKiIGzyJQPkxHPEvubvOyQFiCWRHjJ80hxvOMaefCHt1mg_pYddOWGU-87h3ya4N2r0NOOJ21cZAYykisYtmOsb50VFrK2eCDtg6Kv67y6NP0DaDCkIGE2ol6K/s1600/author.png) no-repeat scroll top left;padding-left:20px;font-size:11px;'><data:post.author/></span> | <span style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG50GTuAck2UGu-zQdH__Tt6gLwPtn7Ils8cY2n58OyKD3cCcx_XsB2d_bIOODibdXoczWa0BmSLrKN2Y5D09_gMyikUvQps0A038oQyQbdyztXqkfBrBx5ILlc9MvEEfBhLQi3V1YHWO3/s1600/clock.png) no-repeat scroll top left;padding-left:20px;font-size:11px;'><data:post.timestamp/></span> | <span style='background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiHJD9BCECQaUTIxf6CcEzm9iPtR56EmQFeBTDNDOecJGJEB8howhUtqKGiUWAA2zM1nDJd1vqt1UOl8b8cWo2ts4dNJqzr_4qy9fE0HM3PPh_mF6fj46IJRyWDyQ4wrK0bUl20ovGQ12G/s1600/tag.png) no-repeat scroll top left;background-position:0px -1px;padding-left:23px;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=7&quot;' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != &quot;true&quot;'>|</b:if></b:loop></b:if></span><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/AVvXsEigqc-32TJvdr5GZcFYMLeSNyxfKXMAVCGEzeWNwy78jYHWCNHmfDCIq3Omb0bjVLj4oKYoJkQhdIgc6b1DHv3kZ660aQY_kdfFNLPuiTfk2hcF__DgRzZq9V68rytEsMXc7zUdDud0i9t1/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:

To change the icons, replace the urls in blue with those of your images (see this tutorial: how to get the url of an image):

- first url is for the author's icon
- second one is the clock icon
- the third one is the icon for the labels
- the last one is for the comment bubble

Related: How to Add Comment Bubbles to Blogger posts titles

5. Click the 'Save template' button and you're done!

No comments:

Post a Comment

Your feedback is always appreciated. We will try to reply to your queries as soon as time allows.
Note:
1. Make sure to click the "Subscribe By Email" link below the comment to be notified of follow up comments and replies.
2. Please "Do Not Spam" - Spam comments will be deleted immediately upon our review.
3. Please "Do Not Add Links" to the body of your comment as they will not be published.
4. Only "English" comments shall be approved.
5. If you have a problem check first the comments, maybe you will find the solution there.

Post Top Ad

Responsive Ads Here