StyledThemes

Add a Recent Post widget with thumbnails

This video in this series provides an overview of how to setup a Recent Posts widget with thumbnails like the Encounters theme demo website displays on its blog page. The widget is a plugin called Recent Posts Plus and offers many features that you can customize how the widget looks. Here is a demo of it in action: 

Recent Posts

Update: The date format for this widget should be: F j, Y
I will update the txt file snippet, but you can use a different date format if you wish, as it doesn’t have to be what I use.

Covered in this video:

  • Introduction to the plugin.
  • Getting the Recent Posts Plus plugin and setting it up.
  • Using the widget to display recent (latest) posts with thumbnails.

Widget Output Template

You can change the template layout of your widget how you want it, but to make it easy for you, I’ve provide you with the code that the demo site uses. Before you copy and paste this, I recommend making a copy of the default code that shows up in the widget first as a backup. This is the live demo version:

NOTE: If you see a forward slash before the /{PERMALINK}, remove that as my editor here keeps adding it on href display of code.

<li style="margin:6px 0;">{THUMBNAIL}<h4><a title="{TITLE_RAW}" href="{PERMALINK}">{TITLE}</a></h4>
<span class="rp-date">{DATE}</span>{EXCERPT}</li>

Selecting Categories

You will be selecting category ID’s to display recent posts from by using this code in the WP_Query Options field:

{
"cat": "5,10,11"
}

Video