Recent Posts Widget


What is a Recent Posts Widget ?

A Recent Posts Widget is a widget that displays a short summary of the most recent blog entries.

Where do I put it?

Most bloggers put the Recent Posts Widget in the sidebar of their blog. But you can put it in any page element you like.

What is the code?

Add a html-type page element to your blog with the following content:

<script src="pathname/showrecentposts_xx.js"></script>
<script language="javascript">
   var numposts = 5;
   var numchars = 100;
   var showpostdate = true;
   var showpostsummary = true;
   var standardstyling = true;
<script src=""></script>

In this code the following parameters are used:

Parameter Valid values Comments
pathname any valid url The pathname where your javascript-file is hosted, e.g.
showrecentposts_xx.js any valid filename The javascript-file in your language. Replace xx with the letters of your language, e.g. en for English, es for Spanish
numposts integer number from 1 to 25 Number of posts to display
numchars integer number > 0 Number of characters of the post content to be displayed
showpostdate true
If true the post published date is displayed
showpostsummary true
If true a summary of the post content is displayed. A maximum of numchars characters is displayed, the rest is truncated. If the post-content had to be truncated, a link with the text …(more) is added to the summary.
standardstyling true
If true no special styling is applied. Only the summary is displayed in italics. If false custom classes are applied (see below) any valid blogger blogname The name of your blog
orderby= published
If the parameter is set to published the recent posts are ordered by publish-date. If it is set to updated the recent posts are ordered by update-date.

Custom styling

If you want the Recent Posts Widget to be styled in a special way, you can define custom CSS-classes. The Widget has the following structure:

<div class="bbrecposttitle">PostTitle - PostDate</div>
<div class="bbrecpostsum">PostSummary</div>
<div class="bbwidgetfooter">WidgetFooter</div>

You can add CSS-code for these custom classes to the skin of your blog.

Language Versions

This Widget is available in several languages. Click on the file-link to download the javascript file to your local PC.

Language Javascript file
Dutch showrecentposts_nl.js
English showrecentposts_en.js
French showrecentposts_fr.js
Spanish showrecentposts_es.js
Portuguese -
Italian -

If you want to create your own language version, please download one of these files, and edit it using Notepad or any simple text-editor. And please share the results with our community!

Widget Installer

There is a Widget Installer available for the English version.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.