It is not a worst case scenario, that hiding post footer from your homepage when you feel it's bothersome and taking a lot of space from homepage. So you will show only snippet of post and leave a link to actual post page using jump breaks. But with the hidden post footer, you will hide most details from homepage which are relevant to the particular post such as published date and time, author name, related labels/categories, number of comments etc. Do you know how to show off number of comments with the link to related post comments?
Now you can show off number of comments on your post header or just only your homepage just in a few steps. So neither you have to suffer being unable to show off your comment details on homepage or discourage readers without showing off how popular your posts are and how much readers interested in your posts to comment on them.
Note: If you have enabled custom comment form such as Disqus then this tutorial is not for you. This tutorial regarded with Blogger default comment form and Facebook comment plugin only.
Steps:
2. Click on your Blog Title.
3. Now navigate to Template tab.
Note: Before editing your template, you may want to save a copy of it.
4. Click on Edit HTML button.
5. Click Proceed button to continue.
6. Tick on, Expand Widget Templates.
7. All you have to do is copy and paste following code snippet to your post header to display comment link. Before place it on header, let's find out what changes you can do for this snippet to take most out of it.
<b:if cond='data:blog.pageType == "index"'>
<span style='font-family:verdana;font-size:2'>
<a expr:href='data:post.url + "#comments"' style='float:right'>
<b:if cond='data:post.numComments == 1'>1 <data:commentLabel/><b:else/>
<data:post.numComments/> <data:commentLabelPlural/>
</b:if>
</a>
</span>
</b:if>
Note: If you are solely depend on Facebook social comment plugin on Blogger, follow these steps.
Add Facebook Comment Link
i. Add id="fbcomments" to your Facebook comment plugin code.
i.e: <fb:comments id="fbcomments"
ii. Now you can use below code snippet and proceed with other steps.
<b:if cond='data:blog.pageType == "index"'>
<fb:comments-count expr:href='data:post.url + "#fbcomments"'/>
</b:if>
Color Indication Information
- Conditional Expressions
Conditional expressions which enables displaying comment link only on your home/index page. If you wish to display comment link even on post pages, just remove both lines.
- Font Family of Comment Link
You can change font family of the comment link by changing value here. If you prefer having default text format, just remove this value with regarding attribute, face.
- Font Size of Comment Link
If you specify comment link on the line of Post title, comment link will inherit Post title font size and you may feel it's larger for comment link. So you can specify the font size of the comment link here. Else if you specifying it on another line which has smaller or prefer font size, you can just remove this value with related attribute, size.
Note: If you are not specifying font face and size values, it is recommend you to remove both <span> tags to avoid inconsistencies.
- Comments Division HTML ID Value
This is your id attribute value of comments division HTML element. It can be any unique id value specified within your comment form HTML elements on post page which link will navigate to. By default Blogger comment form on post page started with below line,
<b:includable id='comment-form' var='post'>
So I have specified it's id value comment-form here. if you are familiar with HTML and need to navigate link to another place, just add related HTML element id value here. Else make this no change.
- Link Style
This specifies style of your link. Here it specified to be floated to the right, which is useful if you are displaying comment link with right aligned to the post title. Else if you need to show it up left aligned, you can remove this or change attribute value as, float:left.
8. Now you can add above snippet by selecting one of your choice below. Here I will do changes which are must do according to the placement of snippet.
Display Comment Link Below the Post Title
Search for below line in your template and add the code snippet just after it with your preferable changes.
<div class='post-header-line-1'/>
Display Comment Link with the Post Title, Right Aligned
i. Find below code in your template.
<div class='post hentry'>
ii. Find out lines with <data:post.title/> layout tag, starting form <div class='post hentry'> line to <div class='post-header'> line. You will find first 4 lines with <data:post.title/> tag as below,
<a expr:href='data:post.link'><data:post.title/></a>
<a expr:href='data:post.url'><data:post.title/></a>
<data:post.title/>
<data:post.title/>
iii. Now copy and paste comment link snippet right end of the each 4 lines. It's better if you use comment link snippet after removing existing new lines on it (making snippet to a single line).
i.e:
<a expr:href='data:post.link'><data:post.title/></a><b:if cond='data:blog.pageType == "index"'><span style='font-family:verdana;font-size:2'><a expr:href='data:post.url + "#comments"' style='float:right'><b:if cond='data:post.numComments == 1'>1 <data:commentLabel/><b:else/><data:post.numComments/> <data:commentLabelPlural/></b:if></a></span></b:if>
9. Now Preview for made changes and Save template after confirming the comment link on post header.