There are several advantages to using this method:
- Special characters are more likely to be recognized and correctly displayed
- This method does not rely on externally hosted scripts, which makes the widget load much faster
- It is much easier to make alterations to the widget
- Comments are displayed in list format, and can automatically be styled to match the design of your blog.
At present, you would need to edit the contents of your Blogger template to add this new version of the "recent comments" widget due to current problems with Blogger's "Add widget" API. As soon as I am able to access the API successfully, I will work on a widget installer which will enable you to add this new widget with ease.
For now, here are the instructions to add this widget to your template by customizing your blog's HTML code.
How to add the new "Recent Comments" widget to your Blogger layout
Step One: Back up your template!
Firstly, you should make a full back-up of your existing template. This will enable you to restore your template to it's original composition if you accidentally make a mistake.
To make a back-up of your blog template, go to Layout>Edit HTML in your Blogger dashboard, and click the "Download full template" link near the top of the page.
This allows you to save a copy of your template to your computer as an XML file. Rename your template to help you find it easily, being sure to retain the ".xml" extension.
Step Two: Add new code to your template
In this step, we will add a complete widget (including the widget template) by adding HTML code.For this, you will need to access the Edit HTML page for your Blogger template. Do not click the "Expand widget templates" box as this may make it more difficult for you to see where the code should be added.
Using your browser's search function (CTRL+F or CMD+F) locate the following line of code:
<b:section class="sidebar" id="sidebar" preferred="yes">If you cannot locate this exact section, find a line which begins with <b:section which references the "class" or "ID" of sidebar.Immediately after this line, paste this entire section of code:
<b:widget id='Feed99' locked='false' title='Recent Comments' type='Feed'>Then preview your template. If you have made any errors in pasting this section of code, you will notice the error in your preview, or will receive an error message. If this is the case, click the "Clear Edits" link near the bottom of the page to revert your template back to normal, then begin again.
<b:includable id='main'>
<h2><data:title/></h2>
<div class='widget-content'>
<ul expr:id='data:widget.instanceId + "_feedItemListDisplay"'>
<b:loop values='data:feedData.items' var='i'>
<li>
<a expr:href='data:i.alternate.href'>
<b:if cond='data:showItemAuthor'>
<b:if cond='data:i.author != ""'>
<span class='item-author'>
<data:i.author/> said:
</span>
</b:if>
</b:if>
<span class='item-title'>
<data:i.title/>
</span>
<b:if cond='data:showItemDate'>
<b:if cond='data:i.str_published != ""'>
<span class='item-date'>
on <data:i.str_published/>
</span>
</b:if>
</b:if>
</a>
</li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
<b:widget id='Feed2' locked='false' title='Recent Posts' type='Feed'>
<b:includable id='main'>
<h2><data:title/></h2>
<div class='widget-content'>
<ul expr:id='data:widget.instanceId + "_feedItemListDisplay"'>
<b:loop values='data:feedData.items' var='i'>
<li>
<span class='item-title'>
<a expr:href='data:i.alternate.href'>
<data:i.title/>
</a>
</span>
<b:if cond='data:showItemDate'>
<b:if cond='data:i.str_published != ""'>
<span class='item-date'>
- <data:i.str_published/>
</span>
</b:if>
</b:if>
<b:if cond='data:showItemAuthor'>
<b:if cond='data:i.author != ""'>
<span class='item-author'>
- <data:i.author/>
</span>
</b:if>
</b:if>
</li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
To offer a better understanding of where to paste the above section of code, here is an annotated screenshot:
Once you have correctly pasted this code, save your template. At first you will not be able to see the recent comments widget appear in your blog layout. We need to add the URL for your comments feed and tweak a few options before the widget will appear.
Step 3: Add Comment Feed URL
The final step to adding this new recent comments widget is to add the Feed URL for your comments feed.To do this, go to Layout>Page Elements where you should see a new "Recent Comments" feed appear at the top of your sidebar.
Click on the "Edit" link for this widget, where you will be presented with the regular pop-up screen for a Feed Widget:
You need to add the URL of your blog's comment feed in the "Feed URL" box.
The default URL for your blog's comment feed will be something like this:
http://yourblog.blogspot.com/feeds/comments/default
Where "yourblog.blogspot.com" is the URL of your blog. If you use a custom domain, change this to the actual URL of your blog. For example, the URL for the Blogger Buster comments feed is
http://www.bloggerbuster.com/feeds/comments/defaultYou should also tick at least the "Item Sources/Authors" box as this field will be used to display the commenter's name.
Optionally, you could also tick the "Item Dates" option if you would prefer to display the date when comments were added.
Once you have added the URL to your comments feed and ticked the appropriate options, click the "Save" button and take a look at your blog. You should now see your new "recent comments" widget appear in your blog layout.
When this widget is installed, you can move it around to a different part of your layout on the Layout>Page Elements page. As each entry of the comments feed is presented as a list item, the widget should take on the appearance of other list-type widgets in your layout.
Comments? Suggestions?
I hope this new version of the recent comments widget will be suitable for most needs and is easy to install in your Blogger template. Please let me know if you experience any problems when using this widget, or if you have any suggestions for how it may be improved, by leaving your comments below.Initial photo by Rightee (Flickr Creative Commons).
Save as PDF







My name is Amanda Fazani and I write Blogger Buster to help other Blogger users make the most of their Blogger blogs.

Post a Comment 81 Comments:
Thanks for informing.
Does this method work for private blogs?
Awesome...it worked great...and I am clueless wihen it comes to all this HTML stuff! Thanks...I used a template of yours also and so far everything I have tried from your site is so simple to do with the instructions you give!!!!! I cannot thank you enough! :)
Good guide, thanks for great post
You always the best...
But Amanda, i have a problem with broken link. Do you know how to fix broken link in blogger??? If you know, plis help me
@Dina: Unfortunately this cannot work for private blogs. This is because private blogs do not produce any feeds (which would be indexed by search engines and make the privacy invalid).
The only solution I know of to create a recent comments widget for a private blog would be to use a classic template and use one of the non-feed methods described on this page: http://www.bloggerbuster.com/2008/06/recent-comments-for-ftp-bloggers.html
Hope this may help!
Hi there, Amanda.
I have a problem with this one. When I enter the feed URL, it says that there is an invalid feed URL.
What to do and where did it went wrong?
Thanks.
@Renton: I think this feed URL should work if you have installed the recent comments widget on your main blog: http://rentonaktivno.blogspot.com/feeds/comments/default
Try pasting this into the feed URL space when editing the widget. I checked to see that this feed is valid, but do let me know if you still experience problems.
amanda you can check this url for a better recent comments widget
http://www.gosublogger.com/2008/08/adding-recent-comments-and-recent-posts.html
yep amanda you can share it with your readers :)
I just wanted to say that you are awesome and that ever since I found this site I have been in love with it.
Hey there,
Thanks for these tips...I read your blog daily...But if could please tell me: how does this comment widget differ from the recent comments widget I currently have installed on my blog? Please check it out just to see what it looks like at http://michiganrafter.blogspot.com
thanks for your time, it's much appreciated!
nice
Damn, if it could include the post's name, it would have been perfect. This way, without post name, kinda suck :( I'm waiting for the next method. Sometimes I realy do regret for not choosing wordpress...
I'd love to know how to let folks subscribe to comments on my posts. People without a blogger account cannot subscribe when I have a custom template, and I'm not sure how to go about getting a link in there and whatnot. :/
Many thanks. It is better in presenting Chinese
Hi, and thank you. Is there a way to let people post comments that only appear in the widget? So that the comments do not appear under the original post? It seems like the only choice in Blogger is to show comments or not, but perhaps there's a work-around.
Thanks for all the good work you do! I put you in my link round-up this week.
I tried to comment on your post about lables but that entry is messed up somehow in IE. This one isn't.
The reactions are busted because you can vote once for each reaction.
Hi,
I'm Alisha from Wowzio, and I'm excited to tell you about our new widget platform that helps bloggers increase readership by providing engaging widgets containing your blog's rich content. You can check out widgets customized for your blog here:
Wowzio Widgets for your Blog
I wanted to reach out to you to ask for your feedback on these widgets (feel free to install them on your blog, if you feel they are a good fit). I'm sorry for leaving this message via a comment, it's not at all our intent to spam you ( which is why i'm leaving this comment on an older post and you can always remove this comment ). Again, we would love to hear your feedback.
Thanks,
Alisha Wright
alisha.wright1@gmail.com
The widget works fine! After some initial problems while looking in the internet for a nice, concise instruction how to implement this feature in the code I finally came over your site. Your guide is very helpful and what is most important the element works!
Thanks for sharing your know-how!
J.W. Gawlik
Poland
Buy Oxycontin online
Cheap Generic Cialis
Buy Adipex online
That's simply AMAZING. Thanks so much for such a detailed feed - I didn't realise you had to save the template and edit before things worked sometimes.
BRILLIANT guide for beginners!
Thanks. Got mine to work. Absolutely brilliant! I am now very happy with my personal blog. You're simply the best in my book.
Thank you! I've been trying to get a recent comments widget to work on my private blog, and yours does.
Wonderful!
Buy Atenolol Online.Generic Atenolol
Cheap Paxil.Buy Paxil.Order Paxil.Generic Paxil
Buy Cheap Acomplia Online.Order Acomplia.Generic Acomplia
Buy Xanax Online.Order Xanax.Xanax no prescription
Buy Percocet Online.Percocet without prescription
Buy Accutane Online.Cheap Accutane
Buy Zyban Online.Cheap Zyban.Order Zyban
Buy Evista Online.Buy Generic Evista
Buy Claritin Online.Buy Cheap Claritin
Buy Prozac Online.Buy Generic Prozac.Order Prozac no prescription
Finally! A recent comment widget that worked!! Thank you SO much!
Thanks. This was just what I needed.
I installed your code and it worked fine....but in stereo. It pasted 2 identical widgets instead of just one.
I repeated the whole process several times and the same thing kept happening.
Hi Amanda...
Can you give me information about readmore stting and comment form for Butterfy template from you...
please visit my site http://aneukagamaceh.blogspot.com
I have trying for setting but can not...why...?
Thanks for your help Amanda
Please send information to my email or my site
Happy good day for you
Thanks Amanda,doing a greatwork here,blogger is now moving to overtake wordpress you are the best in blogger plugins
may i translate this aricle to indonesian??
would you give me permitt?
try test...
try test...
Amanda can you show me how to modify your recent comments to show more than 5 comments.
Thanks for your tuts.
yeay!!!
thanks for the info bro!
:)
It worked, this one really was easy...
Any way to get the commenters' name in a different color from the rest of the link?
hmmp
hi
Order Xanax no prescription.Cheap Xanax Online
Buy Oxycontin Online.Order Oxycontin overseas
Buy Percocet Online.Percocet without prescription
Buy Elavil without prescription.Buy Elavil On-line
Extra cheap Phentermine.Cheap 37 5 phentermine
amanda, this worked at the beginning.
but the comments won't be updated.
can you give me any suggestion?
thanks.
Hey there! Will this allow comments to show up at the end of each post, as they currently are on this site? I'm new to blogging- my site can be found at realitylalaland.blogspot.com
Thanks!ul
ff
may i know how to modify the number of comments and posts?
This is great Amanda, I just added this comment widget to my blog and I love it. Thanks! bloggerbuster is one of the best resource on blogger.
Artificial Owl
Order Ritalin Online.Generic ritalin.Cheap Ritalin
Buy Evista Online.Buy Generic Evista.
Buy Cheap Acomplia Online.Order Acomplia
Buy Claritin Online.Buy Cheap Claritin
Buy Codeine online.Codeine without prescription
ok thank you
Can we make the comments more than five?
I am trying to get my page to look like your setup. The post followed by an ad and then the comments. I want readers to be able to easily have a conversation about my posts. Is that only possible with a self-hosted site? If so, what steps should i take to make the switch? If you don't mind, please e-mail me at iitimmytii@aol.com. Thank you!
Thanks for the tips. I've add it. http://seno008.blogspot.com
You are my hero. I'm hard at work preparing a migration of my blog yo your new halo template. Amazing stuff. Thanks.
thanks, Amanda, great tips
I'm having the same problems Marshmallow and Pardes had- 1) the widget posted to my blog fine, but there are two of them and if I delete one, it deletes both. 2) It is not updating. Can you help? Thanks
I Couldnt Know how to set up the URL feed : i dont know what to write on there " when i paste the URL it says that , Please correct the errors on this form , and invalid feed URL " something like this is appearing.
can u pls pls help me on this i would love to have this element on my Blog.
Greate hack for the comments.But i didnt achive it for my posts.i need a code that permit to be able to see random posts. is it possible without using feedburner?
I have an issue...everytime I add the recent comments thing...it is showing comments from other blogs of mine...is there a way around this?
Hi there...THanks for this...Is there any way to limit the number of characters per comment displayed?
thks a lot!!
O.K. well it worked except for it's not a comment widget, it's a post widget:(
.
I added it to my blog today and it works great. Thanks.
Hakko
You need to add a question mark after the word default in your comments feed.
http://blogname.blogspot.com/feeds/comments/default?
It worked for me.
.
Mine isn't updating either. It uploaded the comments once, but never again. I've tried clearing my cache, but it doesn't seem to be my machine.
I just recently installed this widget, and when I go to configure it [by clicking "edit" on the Page Elements screen], the configuration box is blank [with a thin, wide flesh-colored oval]...
Thank you i have added the code successfully. But when i click on edit, it doesn't give the option to add my blog comment feed. My blog test address is test1953.blogspot.com
I'm having the same problem--the config box is blank... I simply pasted the code exactly as it is given above--so I don't see what I could have done wrong.
You could also add it as a feed and check "Item sources/authors" - less custom styling available, but effective and simple.
I have the same issue, usually i'm pretty good with this stuff, but like these last few people said when I click on the "Edit" link for the comments in the Layout, it just pops up a bare looking page, with no input form for adding my feed location...
Thanks for the information.
Infomist Services
WOW Thanks a lot..! i'll be using this, My blog extremmely needs things~
nice idea., cool., thanks for the post dude.,
Our Online Pharmacy no Prescription doctors will evaluate your health information and provide you with a prescription, so you do not need a prescription from your regular family physician to cheap Generic Viagra. More info at: http://www.safemeds.com/
i found this method to be much easier:
http://www.tipsblogger.com/2009/04/add-recent-comments-widget-to-blogger.html
i'll try this out! Your Daily Word
I am really satisfied with my it. I wish I would have thought of it first. Awesome!
Our order viagra will evaluate your health information and provide you with a prescription, so you do not need a prescription from your regular family physician to cheap Generic Viagra. More info at: http://www.xlpharmacy.com
mine it say's like this!We were unable to save your template,Please correct the error below and submit your template again.
More than one widget was found with id: Feed2. Widget IDs should be unique.
I have a question Amanda, it seems that I cannot edit the Recent Feed, edit panel appears blank, can you help me with this?
Thanks!
Great Article! Really helpful!
By the way, take a look at this site: http://www.vismomedia.com and get paid for hosting cool videos in your blogs.
Great post! Thanks for posting the code for this widget!
I'm having the same trouble where I got into edit the comment feed and blogger gives me essentially a blank box. I can't edit the feed.
Thanks.