Ad code

Customizable Related Posts Widget for Blogger

We already posted a few tutorials on how to add related posts widget with thumbnails in Blogger with summaries or only titles, which can be compiled into a single All-In-One Widget with powerful options. This new customizable related posts widget for Blogger integrates all the features we've seen before and more, such as thumbnails (square or round), post dates, excerpts, display only titles / thumbnails.

Now let's see what this related posts blogger widget has to offer.

related posts widget, blogger widget

Related Posts Widget Features:

  • 9 attractive styles to match your needs
  • Show Title, excerpt & thumbnails
  • Display simple related posts with titles / summaries / post date
  • Choose whether to display the post thumbnails or not
  • Ability to control the thumbnail image size
  • Option to choose square or round thumbnails
  • Show post text excerpts
  • Control the length of the post excerpt / title
  • Determine the number of related posts to display


  1. The related posts widget recognizes post thumbnails uploaded through Blogger itself (or Picasa Web Albums), other images from Photobucket, Flickr, or other non-Blogger hosts will not be supported.
  2. This widget is compatible with the standard desktop Blogger templates except Dynamic Views, which does not accept customization.
  3. The script does not work on private blogs, so your blog / site must be open to the public in order to show.

Adding Customizable Related Posts Widget in Blogger

Log into your Blogger dashboard, go to 'Template' and open template editor by clicking the 'Edit HTML' button below 'Live On Blog' preview.

Next, we're going to use the template search feature, be sure to follow these directions exactly:

1. Place your cursor on the template code.
2. Click once.
3. Press CTRL and F at the same time (PC) or Command and F (Mac).

The search box will open in the upper right corner of the template editor.

Type in the search box, then press ENTER. This will take you to the tag in your template and highlight it in yellow.

Select and copy the entire CSS style below and paste it directly ABOVE the tag:

Next, we need to add the script  - search for the following line:

Once you found it, click the small arrow not beside it but with one level above to expand code and scroll down until you see - right below this tag, you should see the line including the "postQuickEdit" id.

See the screenshot for more help:

Just ABOVE the tag, add the following script:

How to Customize the Related Posts Widget for Blogger?

To change the 'Related Posts' text that appears above the widget, modify the text in red:
relatedHeading: "<h4><span>Related Posts</span></h4>",

To change the number of posts to display, change the '4' value from this line:
relatedPosts: 4,

Note: you may need to change the percentages in the CSS styles above in order to make posts fit the related container. Just follow the values in red and play with them until you get the best results.

To change the style of the related posts widget, modify the '4' value from:
relatedStyle: 4,

Available Related Posts Styles

  1. simple related posts widget that will show post titles only
  2. display post titles and snippets
  3. display post thumbnails, titles and snippets
  4. display related posts thumbnails, titles and post date (shows by default)
  5. display related posts thumbnails and titles
  6. post titles in front of thumbnails, instead of having them below the thumbnail
  7. display thumbnails only
  8. small thumbnail with titles on the right and date below
  9. small thumbnails with post titles and excerpts on the right

Customizing the Related Post Thumbnail Size & Style

By default, thumbnails are resized and cropped automatically to be 300px wide by 200px tall. If you want to change the width and height of the thumbnails, modify the '300' and '200' values from:
thumbnailSize: "w300-h200-p-nu",
defaultThumb: "",
Note: 'w' comes from width, 'h' comes from height. To make the thumbnails square, change the 'h' (height) value and make it equal with 'w' (width) value. A higher value will result in more high-res images.

If you want thumbnails have rounded corners, change 'false' with 'true':

Customizing Related Titles & Excerpts

To shorten the post title, change auto with the number of characters to show:
titleLength: "auto",

To reduce or add more characters to the snippets, change the "45" value:
snippetLength: 45,

If you want to center text (title and summary), change 'false' to 'true':

To open links in a new tab when visitors click on a related post, change "false" to "true":
openNewTab: false

Once you're done with the settings, click the 'Save Template' button and now you can see the related posts widget live on your Blogger blog.

Final words

That's it! With the new customizable Related Posts widget for Blogger you will be able to add unique features to the related content section of your blog. However, all of these styles look and work slightly different, so take your time, and pick your favorite.

Post a Comment