We came across
a comment on Google+ this morning that had us scratching our heads, mainly because we never noticed this odd behavior in Blogger, but once noticed, it really is strangely wrong.
Basically it boils down to all "index" pages in a Blogger site, that when a page has multiple posts on it, in the footer of each post it says something like "5 comments" or "no comments", but never a link that says "leave a comment". Sure, the "5 comments" or "no comments" are links to the comment form, but in terms of usability, the poster is completely correct in saying that's very weird behavior.
So we took it upon ourselves to write a fix!
The original code
You can find the following code by going to the Edit HTML function under your Template page, then checking the box to "Expand Widget Templates". Please remember to backup your template first!
<span class='post-comment-link'>
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:post.allowComments'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
<data:post.commentLabelFull/>:
</a>
</b:if>
</b:if>
</b:if>
</span>
Our modified code
Instead of this part:
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
<data:post.commentLabelFull/>:
</a>
You could do:
<data:post.commentLabelFull/>, <a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
Post a Comment
</a>
This would display as: 5 Comments,
Post a Comment
("Post a Comment" would be the link)
The no comments needs to go period. It should be just '5 Comments' for example. Just plain and simple. I'm starting to hate blogger. It annoying to tweek.
ReplyDeleteSo go ahead and change it! Sheesh
DeleteDavid..
ReplyDeleteI just sent a message that I was not able to receive comments and was uncomfortable editing html...as there could be "unpredictable" ways in which it could affect features and is only recommended for advanced users. I like the features.
But, I changed my number of posts per page to 1. (I had already followed the settings instructions for comments).
And, now, below the post is a link to comments. yay ! thank you.. Julie
I got exactly the same issue on my Blogger home page, fixed by using your tips. Thanks a lot !
ReplyDeleteHi. I just tried your code above and received an error message. Any suggestions? I really want to change the comment field.
ReplyDeleteThank you.
Hi Jeannette, in order to help I need a bit more info. The URL of your blog and the error message you received would help in debugging!
DeleteHi David, Thank you, thank you, thank you :) it worked. I have been trying to figure out how to do this since I created my blog over a week ago.
ReplyDeleteDo you know how I can fix the font size on the next screen, after they click on the "No Comments, be the first to comment :)" it shows as huge font "No Comments:" "Post a Comment"
Also could I get rid of the "No Comments:" part on this second page and just have "Post a comment" or at least change it to "No comments yet, post a comment"?
My blog URL is http://happy-ramblings.blogspot.co.nz/
Thanks again for your help.
Hi david,
ReplyDeleteGreat tip as always - just done it!
Cheers
Thank you so much! The "No comments" line was making my blog look very sad. This is exactly what I needed!
ReplyDeletemonroemakeshift.blogspot.com
Great idea, thanks very much :)
ReplyDeleteVery helpful, thanks!
ReplyDeleteworked a treat, many thanks
ReplyDeletegreat work man.
ReplyDeletehttp://www.edirectsms.com