Blogger Code For Recent Post Widget For Showing List Of Recent Post In Sidebar


Blogspot has built-in recent posts widget which shows a list of recent post along with thumbnails. Alternatively you can avoid the built-in widget by adding a code on your own.

<span style="color: rgb(0, 51, 102);font-family:verdana;" >
<b>LATEST POSTS</b>
</span>
<script style="" src="http://home.kpn.nl/oosti468/downloads/showrecentposts2.js"></script><script style="">var numposts = 5;var showpostdate = false;var showpostsummary = true;var numchars = 100;var standardstyling = true;</script>
<script src="http://bdtechie.blogspot.com/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts"></script>

var numposts = 5 represents the number of post you want to show on the sidebar. If you want more that that or less than that then put a number below or above 5.

showpostdate = false means the widget will not show post date. If you want post date to appear then you have to replace “false” with “true”. Therefore showpostdate = false will become showpostdate = true.

showpostsummary = true means that the widget will show a short summary of the post. If you don’t want the widget not to show post summary then you have to replace “true” with “false” and the resulting code will be like this showpostsummary = false

var numchars= 100 is the number of words that will present in a summary of post under the recent post widget.

When you post this widget code on your blog don’t forget to change the address of script source. You only need to change bdtechie.blogspot.com to yoursitename.blogspot.com

<script src="http://bdtechie.blogspot.com/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts">

Edit the red marked portion to:

<script src="http://yoursitename.blogspot.com/feeds/posts/default?orderby=published&amp;alt=json-in-script&amp;callback=showrecentposts">

The widget will appear like below:

latest post widget blogspot

If you want the recent post widget or latest widget to show only post title then you can try another option. I will sugggest you to add widget without the post summary since widget with only post title will look better

An example of widget with post title only:

latest post widget only title blogspot
<span style="color: rgb(0, 51, 102);font-family:verdana;" >
<b>LATEST POSTS</b>
</span>
<script style="text/javascript" src="http://www.presssalad.com/filecab/rpost-english2.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://YourOwnB1og.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=showrecentposts"></script><scriqt>
<span style="font-size:78%;">&#8593; <a href="http://www.madtomatoe.com" title="Recent Posts Widget">Get this </a><a href="http://www.madtomatoe.com/recent-posts-widget-2/" title="Grab this Recent Posts Widget" target="_blank">Recent Posts Widget</a></span></scriqt>
<!-- Happy Blogging! -->

Edit the red marked part with you blogspot’s address and you are good to go.

About Nasif

I am a hobby blogger and I love Wordpress. Herbal tea addict. Loves being lazy and zZzZ...