Tutorials, tips and tricks about Blogger

31 Dec

Change the message next to the number of comments on Blogger

16 Comments | by in Design, Tutorials | 2009

Español Português

By default, every post we publish on Blogger has a link with the number of comments (if it’s enabled, of course), and it says something like "0 Comments", and this isn’t the best presentation. Another problem comes when the post has just one comment, and the link shows "1 Comments", which is not logical at all. Finally, when the post has more than one comment, the link get a little bit of sense. But don’t worry about it, cause now we’re gonna teach you how to fix it.

1. Go to the “Layout” tab, also called “Design” from the desktop, and then go to “Edit HTML”. After this, check the “Expand widgets template” box.

Dashboard → Layout → Edit HTML → Expand widgets template

2. Search for the following code:

<b:if cond='data:post.allowComments'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>
1 <data:top.commentLabel/>
<b:else/>
<data:post.numComments/> <data:top.commentLabelPlural/>
</b:if>
</a>
</b:if>

And replace it with the following:

<b:if cond='data:post.allowComments'> <a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'> <b:if cond='data:post.numComments == 0'> Leave your comment </b:if> <b:if cond='data:post.numComments == 1'> 1 Comment </b:if> <b:if cond='data:post.numComments > 1'> <data:post.numComments/> Comments </b:if> </a> </b:if>

3. Now search for the following code:

<b:if cond='data:post.allowComments'>
<h4>
<b:if cond='data:post.numComments == 1'>
1 <data:commentLabel/>:
<b:else/>
<data:post.numComments/> <data:commentLabelPlural/>:
</b:if>
</h4>

And replace it with this:

<b:if cond='data:post.allowComments'> <h4> <b:if cond='data:post.numComments == 0'> Leave your comment </b:if> <b:if cond='data:post.numComments == 1'> 1 Comment: </b:if> <b:if cond='data:post.numComments > 1'> <data:post.numComments/> Comments: </b:if> </h4>

Both of the replacements are because of the link will show up twice: on main page and on each post’s page. The bold text can be changed for anythig you want tho show.

Vía: blogandweb.com

Comments

16 Comments, leave a reply · Feed
  1. Thinchhia January 11, 2010

    Nice trick..thanks

  2. Hey, thanks for posting this!
    Really – it’s a great help :]

  3. Paul Santosh August 14, 2011

    Can I change the text 10 comments to 10 Awesome Comments?

  4. Thanks for this code, it worked … just what I was looking for.

  5. Thanks much… Managed to follow the instruction and make the changes 🙂

  6. very nice, amazing trick, installing now.

  7. moncler jacka November 13, 2012

    Wow, wonderful blog post! you make blogging look easy. The overall look of your website is great, as well as the content! I like it very much,thank you.

  8. tinnajer blog March 1, 2013

    god bless you, thank you so much : ) im very happy now with your post about it, thanks

  9. I cannot find either of the original codes?? this part:

    1


    Does not exist in my expanded HTML Template??
    Please help, I would really like to change this. I am using a custom template, would that make a difference?

    Thank you,
    Sissy

  10. lap mang fpt May 6, 2013

    phần mềm, thủ thuật hay, code thiết kế web,Lắp mạng FPT, Lắp mạng FPT miễn phí, 090504 5525, Lắp mạng FPT tại nhà, mạng FPT, Cáp Quang FPT , lap mang fpt , lắp mạng fpt miễn phí , tổng đài lắp mạng fpt , đăng ký lắp mạng fpt tại nhà ,lắp mạng fpt ,lắp mạng fpt nhanh nhất ,đăng ký lắp mạng internet fpt,

  11. I really love this post, especially when you talk about quality comments. I really hate it when someone comments on my blog with something like “cute outfit, want to follow each other?” because you know they are just after followers and not looking at building actual blogging relationships.

  12. ebook shop June 13, 2013

    Change the message next to the number of comments on Blogger
    is a great tip … thanks a lot 🙂

  13. couponshawker July 7, 2013

    Couponshawker providing the very best reliable promotions available on online stores.

  14. Elesiss July 28, 2013

    Nice tipss..thaaaanks

  15. awesome trick…Thanks for sharing! :>

  16. No comments text is appearing over comment box ,how to resolve it ,iam waiting for your reply.
    thank you

Reply

You must be logged in to post a comment.

Tutorials, tips and tricks about Blogger