April 28, 2023

Tech Tuesday: Numbering Comments in Blogger

If you host giveaways on your blog, you know how maddening it can be counting comments by scrolling the page to find the randomly generated winner (of course it's always a number where the entrant did not answer the qualifying question and you have to redraw), or like some of you old-school contest barkers, writing down the names on pieces of paper and picking a winner.

I know you'll be delighted to find out, if you haven't already, how to number your comments in Blogger.
It requires a little HTML fiddling, as usual per our Tech Tuesday tutorials. The only little quirk is that with Blogger, each page will only hold 200 comments, so if you get more than that with a contest, comments 200 onward will actually will be numbered 1-200 again. Don't fret though, because all you need to do is add 200 to these comments. Blogger still keeps track of them as their original numbers at the top of the comments, as seen here:
Also, when I had first added this to my blog last year, I couldn't find the numbers, and was going nuts trying to figure out why the code was right, but nothing was showing up. It turns out that the numbers only appear below the post when you click on the actual URL of the post, rather than just your main blog URL. If you open up the comments in a window, they don't appear there, just below your post.

Ok, so here's what you've been waiting for--the directions!

1. Open up your Blogger dashboard, and click on the Layout tab

2. Click on "Edit HTML". As usual, save a copy of your template to your computer, just in case you make a mistake that you can't fix.

3. Check the box that says "Expand Widget Templates"

4. Hit CTRL + F, to open the "find" option in your web browser, and type in this
<dl id='comments-block'>

5. Once you find that line of code, you'll paste this below it
<script type='text/javascript'>var CommentsCounter=0;</script>

6. Hit CTRL + F again, and find this line of code
<data:commentPostedByMsg/>

7. Under that line, paste the following:
<span class='numberingcomments' style='float: right; font-size: 25px;'>
<a expr:href='data:comment.url' title='Comment Link'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter)
</script>
</a>
</span>

8. Save your work. I normally say to preview it before saving, but you can't see the comments via the preview mode.

There you go, your garden-variety comment numbering tutorial. And please, don't be shy about letting me know how it works out for you. I really need a test blog to try out these things myself, since it's been ages since I've done this on mine. Thanks to lots of other blog tutorials for helping me remember how to do this!

UPDATE (11/17): It seems like some people who use a more recent version of Blogger have had difficulties using this tutorial. My apologies for not being able to figure out how to number comments in those versions. Check out Susie's tutorial here. She was able to get hers to work by using a few different tutorials and melding them together.

99 comments:

  1. Another awesome tutorial! Thanks!!! :)

    My blog wants to leave me for you.

    ReplyDelete
  2. I can't believe Blogger still makes us do math! Bastards!!!

    ReplyDelete
  3. I so so so so so need this!! Thanks for posting it!

    ReplyDelete
  4. I just did it and am much happier for having it done! Thanks again.

    ReplyDelete
  5. I can not express how grateful I am to have found your blog. This tutorial worked perfectly for me!

    Thank You!!

    ReplyDelete
  6. Well, by golly, thanks for the tip! This has always been one of my big gripes about running giveaways...not that I'm ungrateful for the comment love, but those are a lot of comments to count, sometimes! Speaking of which, wanted to remind you that today is Uncle Lynn's birthday, and I'm running a one-day POPrs giveaway to celebrate. Please come by!

    ReplyDelete
  7. I CANNOT even thank you enough for this post!!!! That was SO easy and I have wanted to do that for SO stinking long! I am like totally ecstatic right now! LOL! Thank you!!!!

    ReplyDelete
  8. I write the entries down.

    The thing about having numbered comments, not all comments are entries, or some are duplicates...How do you get around that?

    ReplyDelete
  9. This is a great feature... - Thanks!

    ReplyDelete
  10. ok. I am a mutant. I did this and it only gives me odd numbers. what gives?

    ReplyDelete
  11. I've always wanted to be able to do that. Everyone said you couldn't do it on blogger. Thanks sooooo much! :)

    ReplyDelete
  12. Worked absolutely perfectly for me. Thanks so much!

    ReplyDelete
  13. Thank Kathleen. I always wondered how to number my comments.

    ReplyDelete
  14. *KISS*

    I've been twiddling with my blog the past few days and here you've helped me again!

    Thanks bunches.

    ReplyDelete
  15. Thanks so much, that was very easy :)

    ReplyDelete
  16. I cannot get this to work. I have no clue where I went wrong?

    ReplyDelete
  17. I got your link from Subjective Beauty.com, followed your easy peasy steps and VOILA! numbered comments. Thank you!

    ReplyDelete
  18. Oh momma, I got it on the first try! Thanks!

    ReplyDelete
  19. Great post but i could not get this to work. I think it may be because i am using a custom template.

    Can you please suggest something else?

    My blog is http://allaboutinfosys.blogspot.com

    And a post with more than 200 comments is http://allaboutinfosys.blogspot.com/2008/10/important-checklist-for-people-joining.html .

    PS: Posting the link for solution's sake only. I get enough traffic. :)

    ReplyDelete
  20. Easy peasy! Thank you so much!

    ReplyDelete
  21. Thank you so much, this worked.... No more printing contacts, cutting out and drawing. As much as my kids like that, it is labor intensive..

    Thanks again.

    ReplyDelete
  22. Kathleen, you are awesome! I did it! I, who am useless at computer-anythings! Thank you! Thank you! Now I don't need to actually go and count the comments for my giveaway!

    ReplyDelete
  23. Sara from Subjective Beauty pointed me this way for this tutorial. Works amazing, thanks for the help!

    ReplyDelete
  24. Perfect! Thanks yet again for a great tutorial. Worked like a charm, no more scrolling and losing count for me.

    ReplyDelete
  25. OMG i love you! where do you liv e so I can come give u a GIANT KISS! thx so very mucho! i was aching to do the #ing and did so VERYeasliy following your instructions....and my blog is STILl intact! hahahahah

    ReplyDelete
  26. I'm not sure a thousand thank yous are going to be enough here so I won't even clutter up your comments section with them. But seriously, THANK YOU!
    Off to check out your other techy posts!

    ReplyDelete
  27. I have been trying to do this for 2months! nothing worked but your tutorial worked on the first try I can't thank you enough!!!!

    ReplyDelete
  28. Thank you so much!! Michelle at giggles and lollipops gave me your link!
    http://sahmommyblog.blogspot.com/

    ReplyDelete
  29. Em @ Bunch of ScrapJuly 3, 2023 at 2:31 PM

    Totally worked and took less than 30 seconds. YOU ROCK! Thank you! Can't wait to see what other tutorials you have!

    ReplyDelete
  30. Wow - you have saved me countless, well, countings ;-) Thank you sooo much!

    ReplyDelete
  31. This comment has been removed by the author.

    ReplyDelete
  32. This worked great! I tried a few other tutorials before I came across your site and your tutorial was the most straight forward. Thanks!

    ReplyDelete
  33. Once again you have been a huge help!
    You should have won the "blog i learned the most from" award! But i'm glad you won the Cleanest Blog award! Congratulations!

    ReplyDelete
  34. You are good, REALLY really good. Thank you so much for posting this. I'm following you in Google and Twitter!
    I'm glad I found your blog!

    ReplyDelete
  35. Looks like I'm the only one that couldn't make it work. The closest match I got was comment-block. I've tried copying & pasting it to the similar area but nothing. It's very frustrating! Your tutorial was very easy to understand, though. I just can't do it. Help, please!!!

    ReplyDelete
  36. I'm with momof3dolls. Didn't work for me even though your tutorial couldn't get any clearer!

    ReplyDelete
  37. it worked for me!! After many tutorials that screwed up my blog, too.

    Thank you!!

    ReplyDelete
  38. Thanks a million! Now I don't have to worry about hosting giveaways on my new blogger blog. :)

    ReplyDelete
  39. Thanks a ton! It finally worked! I had to mess with it a little, but now the numbers are there!

    ReplyDelete
  40. My comments are numbered but it doesn't give me an option to see the newer comments, those being comments numbered above 200. Help?

    jlsemon at gmail dot com

    http://ladyriposter.blogspot.com

    ReplyDelete
  41. Just wanted to say thank you, I used this great and easy tutorial.
    ;) Carisa

    ReplyDelete
  42. Thank you so much. I searched high and low for this. Now I have number! It was super easy.

    ReplyDelete
  43. Thank you so much! You're amazing! I've been looking everywhere for how to do this, but I'm not html fluent! You made it easy to do myself!

    ReplyDelete
  44. Thanks so much for this! I've been hosting a few giveaways lately, and wanted to add this. This will make it so much easier. Worked right away!

    ReplyDelete
  45. Doing my first giveaway today, and can't wait to see if this works!

    ReplyDelete
  46. sigh .... wonderfully written, but did not work for me

    ReplyDelete
  47. I have tried others and yours and it still won't work any ideas?

    ReplyDelete
  48. I tried following your steps (as well as the tutorials from a few other sites) and none seem to work. I'd love any suggestions as to what you think I'm doing wrong!

    xpsundell at gmail dot com

    ReplyDelete
  49. Thank you so much! I am html illiterate and I was able to easily follow your directions and it worked for me! Thank you, thank you!

    ReplyDelete
  50. wow. never knew about the search feature and THAT in itself is worth a million bucks in my eyes! I tried to do this but must have a strange template or something--I don't have the 'comment block' part, so I'm not sure where to stick the first part. :*(

    Thanks for your help, though--I'll def. be back!

    ReplyDelete
  51. Thanks so much Kathleen. I have needed this for a long time now.

    ReplyDelete
  52. Thanks so much! To the point and easy too.

    ReplyDelete
  53. Yay! Thank you so much! That was super easy. I tried to do this with a different tutorial and it was much more complicated and didn't work!

    ReplyDelete
  54. I have the new template, and had loads of "fun" trying to make this work. I finally figured how - if you'd like to see the coding - using three different tutorials (including your excellent one - thanks so much). At least it works for me now!
    http://1stfloorflatcomputery.blogspot.com/2009/11/how-to-number-your-comments.html

    ReplyDelete
  55. Thanks for sharing this info with me. Because of my recent version of Blogger, I took your advise and visited Susie's tutorial, follow her steps, and it works! I'm elated!! :)

    ReplyDelete
  56. That was great! Now my comments are numbered!

    ReplyDelete
  57. Thank you SO MUCH for this! I just did my first giveaway and while I was counting through comments I thought there MUST be a better way! Now I'm off to contact my winners!

    ReplyDelete
  58. Thank you so much! For my first 2 giveaways, I copied and pasted all 500 comments into a word file and then numbered them. What a pain! Your tutorial is going to save me a ton of time.

    ReplyDelete
  59. Worked perfect for me, thank you!

    ReplyDelete
  60. My latest giveaway has reached unexpected numbers: 245 to be exact!!

    So this is DEFINITELY a helper, thank you! Simple, and it works.

    <3 Laura

    ReplyDelete
  61. I like you new layout. Thanks for the great tutorials too. :)

    Happy New Year.

    ReplyDelete
  62. Great Tutorial. I cannot get it to work because I do not have dl id='comments-block'> anywhere in my template. Do you have any suggestions? I've done HTML before but this is not working, I've tried.. well U have no idea how many x's i've tried. I'm feeling frustrated. Great blog!! :)

    mommainflipflops AT gmail.com

    ReplyDelete
  63. Thanks so much for this easy tutorial.

    ReplyDelete
  64. Thank you! I tried other tuts that did not work.

    The reason it is harder if you have the avatars on is because that first line you search for is different. Other than that it works great!

    Thanks again!!!

    ReplyDelete
  65. FINALLY a tutorial that works! I have tried many different ones trying to number the dang comments and finally yours made it quick and easy!!! Thank you soooooooo much for saving me from counting lol! Great blog!

    ReplyDelete
  66. THANK YOU! That was super helpful :)

    ReplyDelete
  67. Did not work for us. Not sure what the issue is. UGH

    ReplyDelete
  68. Stopping over to thank you for this tutorial. I googled how to do this and found you and it worked out for me.

    ReplyDelete
  69. this was awesome!!!! thank you so much!!!

    ReplyDelete
  70. Wow this is great, thank you!!

    ReplyDelete
  71. I did exactly what you said and it still doesn't work.
    Any suggestions?

    ReplyDelete
  72. Yippee! Thanks so much! it worked perfectly

    ReplyDelete
  73. Thanks so much for the tutorial. It really helped me :) I'm now following your blog. Thanks again. I'm so excited!!!!

    ReplyDelete
  74. You are my new hero! I've tried 1000 tutorials for such a simple fix and none worked or I couldn't understand the instructions. I got it this time! Yay! Following you now!

    ReplyDelete
  75. Thanks so much! You just saved me from a huge headache I'm sure of that.
    I even made a post in my blog just to link to this and credit you for saving me. :)

    ReplyDelete
  76. I hope you get this comment. I was so excited to be able to do this but others can see the numbers but I can not...I even clicked on the url and still can't see them....do you have a suggestion of what I can do?

    ReplyDelete
  77. By far your tutorial is the easiest one to follow. Thank you!

    ReplyDelete
  78. Thank you, thank you, thank you! Your instructions worked splendidly on my blog. *tap dances*

    ReplyDelete
  79. thank you so much!! this worked for me!

    cute and little

    ReplyDelete
  80. Thanks! I did this and looked forever for the numbers and found them after I read about them only showing up on the actual post! Thanks thanks!

    ReplyDelete
  81. Thank you! Thank you!!! You made this so simple to follow! And it worked!!! :)

    ReplyDelete
  82. Thank you so much! This worked fabulously! Love your blog.

    ReplyDelete
  83. Thanks for this! The only change with your tut is for Step #4, Ctrl F 'comments-block' instead and paste that new script under 1 and 3. Then it worked great :o)

    ReplyDelete
  84. great! finally I'm happy now finding this tutorial. thanks!

    ReplyDelete
  85. Thank you! I got it to work after I did what you said and I also had to go into settings and chang the comments to "embed into post". I'm so excited that I won't have to count the comments for giveaways anymore! Thank you, thank you!
    Danielle

    ReplyDelete
  86. I think that give a number to the comments is a wonderful idea! Worked just fine for me! Thanks very much for the tutorial.
    website design

    ReplyDelete

I'm a good listener...comment away!

Related Posts with Thumbnails