How to Add a Custom 'Recent Posts' Widget with Thumbnails on Blogger

Keep your readers on your site longer by showing them exactly what to read next.

One of the biggest mistakes new bloggers make is letting a reader finish an article and then... nothing. If you don't provide a clear "next step," that reader will hit the back button and leave your site forever.

A Recent Posts Widget with Thumbnails is the perfect solution. It transforms your sidebar from a static list of links into a visual gallery that tempts readers to stay for "just one more" post. While Blogger doesn't have a built-in "Recent Posts with Images" gadget, you can add one in under five minutes using this simple method.


Step 1: Prepare Your Feed Settings

For this widget to pull your images correctly, Blogger needs permission to share your "Site Feed."

  1. Go to your Blogger Dashboard > Settings.

  2. Scroll down to the Site Feed section.

  3. Ensure Allow Blog Feed is set to Full or Until Jump Break.

  4. Click Save.


Step 2: Add the Magic Code

We are going to use a lightweight JavaScript snippet that pulls your latest posts and formats them into a beautiful list.

  1. Go to Layout in the left-hand menu.

  2. In your Sidebar (or wherever you want the widget), click Add a Gadget.

  3. Choose HTML/JavaScript from the list.

  4. Give it a title like "Latest Reads" or "New on the Blog."

  5. Paste the following code into the Content box:



 HTML

<div class='recent-posts-widget'>
<script style='text/javascript'>
var posts_no = 5; // How many posts to show
var showpostthumbnails = true;
var displaymore = false;
var showpostdate = true;
var showpostsummary = false;
var numchars = 100;
</script>
<script src='/feeds/posts/default?orderby=published&alt=json-in-script&callback=showlatestpostswiththumbs'></script>
<style type='text/css'>
.recent-posts-widget ul {list-style: none; padding: 0; margin: 0;}
.recent-posts-widget li {margin-bottom: 15px; overflow: hidden; border-bottom: 1px solid #eee; padding-bottom: 10px;}
.recent-posts-widget img {width: 70px; height: 70px; float: left; margin-right: 12px; border-radius: 4px; object-fit: cover;}
.recent-posts-widget a {text-decoration: none; font-weight: bold; color: #333; font-size: 14px; line-height: 1.3;}
.recent-posts-widget span {display: block; font-size: 11px; color: #999; margin-top: 4px;}
</style>
</div>

Note: Most modern Blogger templates already include the helper functions for this. If it doesn't appear immediately, ensure your template's XML includes the standard Blogger script libraries.


Step 3: Customize to Fit Your Brand

The best part about this widget is that it's fully customizable. You can tweak the look directly in the code you just pasted:

  • To change the number of posts: Change var posts_no = 5; to any number you like.

  • To change the image size: Look for width: 70px; height: 70px; in the CSS section and adjust the numbers.

  • To hide the date: Change var showpostdate = true; to false.


Why This Works for SEO

Keeping readers on your site for multiple pages lowers your Bounce Rate and increases Session Duration. These are "User Experience" signals that tell Google your content is valuable. When Google sees people spending 5 minutes on your site instead of 30 seconds, your rankings begin to climb.


The "Internal Link" Bonus

While the sidebar widget is great, don't forget to manually link to related posts inside your articles as well. A sidebar widget gets attention, but a link inside the text gets intent.




Post a Comment

Previous Post Next Post