Widgets

The widget recent posts can be placed anywhere on your blog by using a little shortcode. This is very helpful if you want to create a static homepage but still would like to show some of your recent posts underneath. You have several parameters to design the look of those recent posts.

Parameters

All the parameters below are optional. If you don’t use one, then the recent posts will look as they do on this page.

  • count (the number of posts you want to display. Default is 4.)
  • thumbnail (whether to display thumbnails. Code: on / off)
  • thumbnailsize (size of the thumbnails. Code: small / medium)
  • cat (the ID of the category. If you don’t set a category ID it will display the last recent posts, doesn’t matter in which category they are stored.)
  • desc_length (the length of the excerpt. Default is 430.)
  • date (whether to display the date. Code: on / off)


Default code for the recent posts is: [recent_posts]. Now if you want to include the above parameters your code would look like the following:
[recent_posts count="5" thumbnail="on" cat="5" desc_length="250" date="off"]

Widget with Default Settings


[recent_posts]

Widget With Specific Settings


This is the code used to display the above recent posts:
[recent_posts count="3" thumbnail="on" cat="1" desc_length="250" date="off" thumbnailsize="small"]