Pin It

Widgets

How to Add Related Post Widget with Thumbnails on Blogger

Related post widget with thumbnails is a good widget all bloggers ought to have on their blog since it increases page views & readership while your blog traffic bounce rate will decrease gradually.

Related-Posts-with-Thumbnails-for-blogger

This widget will show beneath every post(s) on your blog. Go through the steps below to make this widget work on your blogger blog.

Read:
How to redirect 404 Error Page to Homepage in Blogger

Related Posts Widget with Thumbnails for Blogger

1.Log in to your Blogger Dashboard and Navigate to Template ==> Edit HTML and checked the Expand Widget Templates Check box. Then use (CTRL+F) to find </head> in your templates.

2.Paste the code below before the closing </head> tag.
<!--Related Posts with thumbnails Scripts www.justnaira.com-->
<!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
<style type="text/css">
#related-posts {
float:center;
text-transform:none;
height:100%;
min-height:100%;
padding-top:5px;
padding-left:5px;
}

#related-posts h2{
font-size: 1.6em;
font-weight: bold;
color: black;
font-family: Georgia, &#8220;Times New Roman&#8221;, Times, serif;
margin-bottom: 0.75em;
margin-top: 0em;
padding-top: 0em;
}
#related-posts a{
color:black;
}
#related-posts a:hover{
color:black;
}

#related-posts  a:hover {
background-color:#d4eaf2;
}
</style>
<script type='text/javascript'>
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjquRryLcylN6YbK3vgtGWc0NsoqKNPxDUmjgmrVeUomM5blz9SBetWM4fxjdOESCfcVd5LyC4dQ8FWCQQyZTKWaupQsB75ML_qJsAFcaVI4aP1p-jhczerlMjSGRc2zCXRt8Wl4ehCLIZj/s1600/no+Image+1.png";
var maxresults=5;
var splittercolor="#d4eaf2";
var relatedpoststitle="Related Posts";
</script>
<script src='http://olusegun-fapohunda-calculator.googlecode.com/svn/wiki/related-post-with-thumbnails.js' type='text/javascript'/>
<!-- remove --></b:if>
<!--Related Posts with thumbnails Scripts www.justnaira.com-->

3.Now find any of this code in your template:
<p class='post-footer-line post-footer-line-1'>
Or
<div class='post-footer-line post-footer-line-1'>
or
<div class='footer'>

Now immediately after any of these lines (whichever you could find) place the code snippet below
<!-- Related Posts with Thumbnails Code Start www.justnaira.com-->
<!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != &quot;true&quot;'>
</b:if>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=5&quot;' type='text/javascript'/></b:loop>
<script type='text/javascript'>
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs(&quot;<data:post.url/>&quot;);
</script>
</div><div style='clear:both'/>
<!-- remove --></b:if>
<b:if cond='data:blog.url == data:blog.homepageUrl'><b:if cond='data:post.isFirstPost'>
<a href='http://www.justnaira.com/2012/07/how-to-add-related-post-widget-with.html'><img style="border: 0" alt="Related Posts Widget For Blogger with Thumbnails" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfWtRZqRDS7lKP6W03-P-Y2ccVlSP1cX6mB4nGjz_J2H_oKKKp-PvF3mbc-czypIKqmy_Y7yaYTs5XHh0vNxq_-1BtbdErGMYb0ryQsuffeXO3mYYb8JhJRzGpeJSjOelRLzM13wd-exkM/s1600/blogger-widgets.png" /></a><a href='http://www.justnaira.com' ><img style="border: 0" alt="Blogger Templates" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmPE3MDHJRoaW_fhuyil9yu5HnQw1skYTrzHmdfkAAPk8CazSvuKR2aY7am9qcSGFaMOKF1_4hXylgV7-XLR8bARxjTkVabn3JdeORLeGA885vke6tCZLsyz5yob5igMYR7YAOD4re8yfs/s1600/blogger-templates.png" /></a>
</b:if></b:if>
<!-- Related Posts with Thumbnails Code End www.justnaira.com-->
4. Now Save your template.

Widget Configuration

1. To change the total no of posts displayed in your blog posts, Edit the following line of code.
var maxresults=5;

2. To Edit the title of the widget, change the following line of code.
var relatedpoststitle="Related Posts";

That's all.


Stay Informed, Inspired and Motivated With Our Free Daily Tips. Add Your Email Now, Don’t Worry, Your Email Address Is Secure:
Enter your email address:

Confirm Your Email Address After Subscribing
We hate spam just as much as you do.


Enjoyed This Article? Follow us on Facebook or Twitter or add us to your circle on Google+ for our new updates.

10 comments so far. What are your thoughts?

Admin said...
Reply To Comment

@jayr, you're welcome

Unknown said...
Reply To Comment

thanx for posting it

Mireille said...
Reply To Comment

hi! I'm pretty new at this and kinda clueless... I tried following your steps . I founde the head but I can't find the other 2 codes..what am I doing wrong?

Admin said...
Reply To Comment

@Gurpreet singh guri, you're welcome

@Mireille, the codes must be in your templates. May be you don't tick the Expand Widget Templates.

shahid said...
Reply To Comment

thanks very nice post

Gul Ahmed @Earn Money Online said...
Reply To Comment

Great Tutorial Thanks For It..

poruke said...
Reply To Comment

thank you for this widget

Emmanuel said...
Reply To Comment

Worked perfectly well for me. One thing I like about the related posts widget is the default "No image" image. But the bottom line is I like everything about the related posts widget. Thanks Fapohunda.

lilacglasses said...
Reply To Comment

Nothing that i do seems to work. It has driven me crazy!!!! i have done this many times, tried different codes that i found on the internet, tried linkwithin but nothing works! what can i do? what is wrong?

Olusegun Fapohunda said...
Reply To Comment

@lilacglasses, you can hire me to implement the code on your blog. Contact me through admin(at)justnaira(dot)com

Click Here to Leave a Comment

Don't just read and walk away, Your Feedback Is Always Appreciated..

Note:
Please do not spam, spam comments will be deleted immediately upon review.

Like US on Facebook