Simple Recent Posts Widget for Blogger/Blogspot

The main advantage on this Recent Posts widget is that it will show not only post titles, but also post excerpts or snippets, and it's easy to customize or apply different style on it. To make it fit your own design, you will need to modify the CSS style - you can change the link or background color, the size and color of text/links.

What you can do with this widget:
- display post titles only
- change the number of posts
- change the number of characters of the post snippet/excerpt
- show the post dates

See the screenshot below:

How to add Recent Posts Widget to Blogger

Step 1. Log in to your Blogger Dashboard > go to "Layout" and click the "Add a Gadget" link


Step 2. From the pop-up window, scroll down and choose HTML/JavaScript


Step 3. Select & Copy the code from one of the options below and paste it into the new HTML/JavaScript:

Option 1: Recent Posts Widget with Snippets

<div id="hlrpsa">
<script src="http://helplogger.googlecode.com/svn/trunk/recent-posts-with-snippets.js">
</script>
<script>
var numposts = 5;var showpostdate = false;var showpostsummary = true;var numchars = 100;var standardstyling = true;
</script>
<script src="http://blog-address.com/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts">
</script></div><a style="font-size: 9px; color: #CECECE; float: right; margin: 5px;" href="http://bloggerchive.blogspot.com/2012/04/simple-related-posts-widget-for-blogger.html" >Recent Posts Widget</a>
<noscript>Your browser does not support JavaScript!</noscript>
<style type="text/css">
#hlrpsa a {color: #0B3861; font-size: 13px;}
#rpdr, #rpdr a {color:#808080;}
#hlrpsa { color: #999999; font-size: 11px; border-bottom:1px #cccccc dotted; margin-top:-10px; padding-bottom:10px;}
.hlrps a {font-weight:bold; }
.hlrpssumm {}
</style>

Option 2: Recent Posts Widget Showing Post Titles Only

<div id="hlrpsb">
<script style="text/javascript" src="http://helplogger.googlecode.com/svn/trunk/recent-posts-with-titles-only.js"></script>
<script style="text/javascript">var numposts = 10;var showpostdate = false;var showpostsummary = false;var numchars = 100;var standardstyling = true;</script>
<script src="http://blog-address.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentposts"></script></div><a style="font-size: 9px; color: #CECECE; float: right; margin: 5px;" href="http://bloggerchive.blogspot.com/2012/04/simple-related-posts-widget-for-blogger.html" >Recent Posts Widget</a>
<noscript>Oops! Make sure JavaScript is enabled in your browser.</noscript>
<style type=text/css>
#hlrpsb a {color: #0B3861; font-size: 13px;}
#rpdr, #rpdr a {color:#808080;}
.bbrecpost2 {
padding-top:6px;
padding-bottom:6px;
border-bottom: 1px #cccccc dotted; }
</style>
Step 4. Customize it:
- Change 5 (option 1) and 10 (option 2) with the number of posts that you want to display.
- Change false to true if you want the posts dates to appear
- Change 100 (option 1) if you want more characters to be displayed.
- To change the color and font size of the links, modify the values in blue (links) and violet (font-size)
- To change the style of posts summary, modify the values in green (color) and orange (font size)
- Replace the http://blog-address.com text with your URL

Step 5. Save your widget. And that's it! Enjoy!

Comments/disqusion
111 comments

  1. says:

    good!
    http://soft375.blogspot.com/ for latest software downloads

  2. says:

    Thanks for the beautify tutorials.

  3. says:

    Okay everything works! One Question thought, what can i change to open the links in a new window (target _blank)? or is that on your script

  4. says:

    Thanks.

  5. says:

    how to change to font color?

  6. says:

    Adjustments to the font color and a larger font for the title would be incredible.

  7. says:

    Hi,

    Just after <style type="text/css"> add the following line:
    For the 1st option:
    #hlrpsa a {color: #yourcolorcodehere;}
    For the 2nd option:
    #hlrpsb a {color: #yourcolorcodehere; }

    Replace #yourcolorcodehere with the hex code of your color (be careful to not delete the ; and } symbols)

  8. says:

    For the font size add the following lines just after <style type="text/css">
    For the 1st option:
    #hlrpsa a {font-size: 15px;}
    For the 2nd option:
    #hlrpsb a {font-size: 15px; }

    Increase/decrease the 15px value for changing the font size ;)

  9. says:

    Please tell me!!.How can I change the number of posts more than 25 posts?

  10. says:

    Thank very much!;)

  11. says:

    Thanks for this however, i also wanted to add the thumnails too.:)

  12. says:

    thank you very much this is a great help for me.

  13. says:

    very very thanks

  14. says:

    Its was Good. Can i know how to make This by Showing video as recent post As If blog is About The Video.Widgets showing video with Title..

  15. says:

    Thank you very much!

  16. says:

    wow great, it was so easy following these steps!

  17. says:

    Thanks so much! For some reason it's only showing 25 post titles as it seems this is the max. Is there a way to increase this? Thanks

  18. says:

    nice !
    http://www.warezbi.com

  19. says:

    how to add rss image aur any symbol in starting of titles..

  20. says:

    oh my God, you this tutorial too, I've been looking on google! Thanks again!

  21. says:

    Thank you so much!! I have learnt a lot from you.You guys are very supportive for newbie's like us.

  22. says:

    Thank you so much for the widget. The featured 'recent Posts' widget on blogger keeps breaking down and takes a big bite out of my pageviews when it does. This one is wonderful. Thank you.

  23. says:

    how to show thumbnail image??

  24. says:

    how can i add recently post with image.

  25. says:

    it didnt work with my blog :(

  26. says:

    this is pretty helpful, thanks

  27. says:

    Hy friend.. could i able to add images with the recent posts ..??

  28. says:

    Thanks..
    :)

  29. says:

    thanks..nice info..

  30. says:

    Does it work with Squarespace?

    I have tried it and it didn't work. Do you have any other alternative?

  31. says:

    so helpful... thank you very much

  32. says:

    This works wonderfully! Anyway to add an image?

  33. says:

    i was developing a new widget and was searching for this script...that's man....

  34. says:

    Awesome. this is what i am looking for

  35. says:

    Hi, the code has an error:

    if (!standardstyling) document.write('/div');

    Should be the following?

    if (!standardstyling) document.write('</div>');

    Thank for this widget!

  36. says:

    Nice and simple widget, worked fine im my website.
    Thanks for sharing

  37. says:

    how to configure widget height

  38. says:

    Nice info.. thanks..
    visit back.

  39. says:

    I use your code..
    i like your code..
    i use in this blog http://freehdtvlive.blogspot.com

  40. says:

    Thank you so much for your blogging help. Your site is so much better than blogger help and your tutorials are so easy to follow.

    Shirley

  41. says:

    thanks

  42. says:

    Thank you so much! I have been looking forward it for days!

  43. says:

    This would be very helpful, as frame is too small to support full blog page. Please, please please...can the author respond to this?

  44. says:

    Thanks for the help. It has appeared on my blog displaying the month and day posted but not the year. Did I miss something?

  45. says:

    My blog is now displaying only 25 posts where actually am having more than 50 posts. Could you please help me out to show/display all the posts in the Dynamic Sidebar of my blog?
    http://bankapure.blogspot.com
    bankapure@gmail.com

  46. says:

    Fixed. It was missing inside the JavaScript file, now I added that code part and it works. Please check your blog. Thanks for visiting!

  47. says:

    You're welcome. Thanks for stopping by :)

  48. says:

    Thank you, its fine now.

  49. says:

    Thank you so much for this. Is there a way of showing a feed for a particular label/tag?

  50. says:

    nice post..
    tq

  51. says:

    Works also fine as widget on my homepage (http://www.kueting.de) with blog source (http://blog.kueting.de)!

    Nice work! :)

  52. says:

    Wow! Works like a charm! Thank you!!
    www.tilliesdream.com

  53. says:

    Thank u very much!

  54. says:

    thanks for this great tutorial! i used it in my blog epicfeedtime.com

  55. says:

    Would it be possible to make the images the link to the post as well?

  56. says:

    Thank You...It's working.......

  57. says:

    Thanks a million, I implemented it on my blog
    www.baba2023.com

  58. says:

    2 things --

    1) Thanks! This script is awesome. I appreciate the time you've spent building and fine-tuning it.
    2) I've actually made this a page on my website. Unfortunately, it only lists the most recent 25. Is there a way to tweak it to show the last, say, 200?

    Thanks again!

  59. says:

    Thank you so very much. I am a reader of your site and love all of your tricks and tips

  60. says:

    Thanks a lot. I used the option1 modified version and it's looking beautiful.
    This is becoming my fav blogger widget blog :)

    http://pravab.blogspot.com/

  61. says:

    P.S> why are the new comments in teh bottom and the old ones on the top?

  62. says:

    how to implement marquee ?

  63. says:

    hi
    can u help and suggest me only loables based blogger templates

    than u so much

  64. says:

    Thankful. It works as advertised. Lot bettr than the default list widget.

  65. says:

    nice..work for me,thank a lot

  66. says:

    thank yoy plend,, nice to meet your blog,, flwback eahh,, :)

  67. says:


    This is an amazing list of information.thanks for sharing

  68. says:

    thank for sharing...it great

  69. says:

    thanks... i like that tutorial..

  70. says:

    Thank you

  71. says:

    Thank you for sharing this! Exactly what I was looking for.

  72. says:

    Well, that was easy peasy! Thank you!

  73. says:

    Well, that was easy peasy...thank you!

  74. says:

    Please help. I have tried this widget in my blog & it shows a tab of Recent Posts at right side in my blog, but it's not displaying any titles in there which I have posted recently. What's going wrong? Please help...

  75. says:

    Ohh.. Thank You, It works nicely. Actually I have messed something, now it's perfect.

  76. says:

    شكرا ... thanks

  77. says:

    can you give me code of related posts !
    thank you !

  78. says:

    Not working man

  79. says:

    Thanks..Its simple and easy to apply..

  80. says:

    Thanks! Can you make the title and post snippet different font size and color? Also, how to put a line break in between the title and snippet?

  81. says:

    Thank you sharing this post.

  82. says:

    Thanks for this Widget, it works great on my Blog!

  83. says:

    not working on my blog :(

  84. says:

    Hi,

    Please make sure that you replace http://your-blog.blogspot.com with your blog address and that it doesn't have more than a trailing slash at the end.

  85. says:

    Thanks , nice blog
    http://makeitsimple.co.in/

  86. says:

    Thanks so very much!

  87. says:

    Just what I'm looking for. Thanks.

  88. says:

    thank you (:

  89. says:

    I'm using option 1 and would like to know how to add thumbnails (80x80px). Thanks!

  90. says:

    HOW TO RESIZE THE TITLE(RECENT POSTS)?

  91. says:

    Yes, i have to try this.
    and it's work to have an wiged popular post in my blog..
    thanks a lot..

  92. says:

    Hello, thank you. After the inbuilt 'Recent Comments' and 'Recent 'Posts' widgets in Blogger went kaput, I'd been looking for a simpler widget. Yours worked beautifully. Thank you so much again. You may wish to view my blog at mobilephoneus.blogspot.in and check it out if you are interested.

  93. says:

    Nice! Thanks you very much! ;)

  94. says:

    can someone give me a link to read up on what coding is compatible with blogger, and its posts.

  95. says:

    Thank you. What code would I need to a "visited color" or a "hover color?"

  96. says:

    Hi Johnny,

    You need to add the following snippets just before the </style> tag:
    #hlrpsb a:visited {color: #000000; }
    #hlrpsb a:hover {color: #0000ff; }

    And then, replace the color values.

  97. says:

    Awesome. Thanks.

  98. says:

    Thanks for great tutorial :)
    it's really helpful and easy to understand!

  99. says:

    Any way to make this widget to show more then 25 recent posts? It can be really helpfull to me if you have any idea. Thanks!

  100. says:

    Hi,
    Great code,
    please can you post an update that removes the limit of 25 posts and how to add a thumbnail,
    thanks
    J

  101. says:

    thanks!
    keep it up!

  102. says:

    Thanks for sharing. I saw a lot of success comments above.
    But it does not work on my blog.
    I tried to add codes into HTML mode for a static page.
    Please help.

  103. says:

    its not working on my website i.e www.resultidea.in

  104. says:

    good job man ! i like it, thanks very much

  105. says:

    It works and looks great, I couldn't possibly ask for more. Once again, thank you for making everything involving code seem so easy.

  106. says:

    Hi i have added the widget and customized it to include photos, Does any one know how i can auto resize the images? Thanks, your help will be appreciated

  107. says:

    Great! Thanks a lot !

  108. says:

    thanks so much, so help me. oh ya, maybe you can make a new widget show article per label like this widget next day. :)

  109. says:

    Not working on my blog.. :-( Just showing "Recent Posts Widget" with the link to your website. Blogger is deleting scripts when i save them.

  110. says:

    But sir i have installed a template which already have the option of recent posts.
    But i don't know how to customize it.
    I want to change color and no. of recent posts.Help me Sir !!

  111. says:

    Is not working for me