Displaying related posts at the bottom of each post is a best way to keep to visitor busy and increase your page views.The related posts widget with thumbnails lists a selected number of posts with image thumbnail from each post.This gadget is quite similar to linkwithin's related posts but if you are going use this gadget then you are getting many options to customize this gadget according to your template.The original script is created by Blogger's Master Aneesh of BloggerPlugins and I customized some CSS part and increases the thumbnail size to give it more beautiful look.You can see the live preview of this gadget below in preview.
How To Add Related Posts With Thumbnail To Blogger
- Go to Blogger Dashboard > Design > Edit HTML.
- Download a copy of your template first.
- Tick "Expand Widget Templates" checkbox.
- Now search for below tag in your template
</head>
Just above it paste below code
<!--Related Posts with thumbnails Scripts and Styles Start-->
<!-- remove -->
<b:if cond='data:blog.pageType == "item"'>
<style type='text/css'>
#related-posts {
float: center;
text-transform: none;
height: 100%;
min-height: 100%;
padding-top: 5px;
padding-left: 5px;
font-size
}
#related-posts h2 {
font-size: 1.6em;
font-weight: bold;
color: black;
font-family: Georgia, “
Times New Roman”, 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: #6E6E6E;
color: #ffffff;
}
</style>
<script type='text/javascript'> var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEslvcSWImx1dcjXPZgtMJzdQeBYEUyb-N3GQk1WnTeBzFGg6ylxThfSLkQPDMxOtksarH8LjVsBhyphenhyphenr0Z9GHYW2GlMsR4sb4wG7lJh1ju9hx749hojW0RH0S8_PUZmvNgpxnUfrWL6ZAs/s400/noimage.png"; var maxresults=5; var splittercolor="#d4eaf2"; var relatedpoststitle=""; </script>
<script src='http://code.helperblogger.com/hb-related-posts.js' type='text/javascript'/>>
<!-- remove -->
</b:if>
<!--Related Posts with thumbnails Scripts and Styles End-->
Now search for below code in your template
<div class='post-footer-line post-footer-line-1'/>
Now place below code snippet just before of above line.
<!-- Related Posts with Thumbnails Code Start-->
<!-- remove -->
<b:if cond='data:blog.pageType == "item"'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'><b:if cond='data:label.isLast != "true"'></b:if>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=related_results_labels_thumbs&max-results=7"' type='text/javascript'/></b:loop> <script type='text/javascript'> removeRelatedDuplicates_thumbs(); printRelatedLabels_thumbs("<data:post.url/>"); </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.bloggerplugins.org/2009/08/related-posts-thumbnails-blogger-widget.html'><img alt='Related Posts Widget For Blogger with Thumbnails' src='http://image.bloggerplugins.org/blogger-widgets.png' style='border: 0'/></a><a href='http://bloggertemplates.bloggerplugins.org/'><img alt='Blogger Templates' src='http://image.bloggerplugins.org/blogger-templates.png' style='border: 0'/></a></b:if></b:if>
<!-- Related Posts with Thumbnails Code End-->
Now save your template and go to your blog,you will watch this widget just below of your posts.
Customizations
- To change the title of widget find the Related Posts in 2nd code.
- To change the number of posts to display find this var maxresults=5; code in 2nd code.
hi ihave a problem when i enter these code after that post is not showing
ReplyDeletetheir just written
"loading'
plz help
I am not able to find the second code: i am using prozain blogger templete please help me.
ReplyDeletepls check "expand widget templates" check box then try again....
DeleteThanks, works properly on my blog
ReplyDeleteTeşekkürler..
ReplyDeleteThis comment has been removed by the author.
ReplyDeletesame space as your blog has but only fitting 4 posts in a row , hoe to adjust size to fit 5 in a row
ReplyDeleteAccording to CSS it's trying to take 100% of the parent element, so try to expand it a bit, or try to set #related-posts width to an exact size (600px or something).
DeleteBro, first thing I want to clear that I am not copied from blogger plugins,I have reshared it on my blog with making some customizations and adding some CSS styles.Also I don't want to steal his credits and his work for making the scripts th'ats why I have not removed the backlinks.I have already added a link to his blog :)
ReplyDeleteThanks a lot for explanation! Made it yesterday - works fine.
ReplyDeleteBut I have another type of an issue.
My blog: http://kuklikicom.blogspot.be/
It is bi-lingual.
TO make life easy to the readers I preceede the text with a small icon with the corresponding flag.
And the related posts widget picks up often this flag instead of nice pictures in the post.
How to bypass this?
Thanks a lot for any advices.
Kukliki
Solved it using div with hidden image :)
DeleteStart knowing CSS :)
Cheers
Kukliki
thank you bro.
ReplyDeletewah... sangat berguna sekali bagi para blogger pemula indonesia.
ReplyDeletesalam
Yuli
^_^
Thanks so much for the code! I have a question...
ReplyDeleteI have different "labels" some with several posts (I am a new blogger) and only one category(label) is showing the related posts. My other label that I have several posts under does not show the related posts on any of those posts. ???
Maybe you could take a look at my site to see what I mean.
DIY Tutorials are showing Related Posts....Before/After are not.
thanks!
thanks, that's work in my blog
ReplyDeletekopost.blogspot.com
Please Visit My Blog :
ReplyDeletehttp://digitcrunch.blogspot.com/
The increased thumbnail size and little tweaks makes it perfect for my blog. Thanks a lot man
ReplyDeleteHi!
ReplyDeleteI used to use similar code on my blog and it worked perfectly fine, but then I don't know what happened, but it doesn't work anymore. Now I implemented your code and it still doesn't work. Can you please help me out. My blog is http://www.adaptacije-jurca.com/.
I tried it on my blog, but it is not working.
ReplyDeleteMy site is http://www.hdpeak.net
Please help.
Can you please make one without thumbnails.
ReplyDeleteNot Working sir! please help its not showing! :(
ReplyDeletehttp://www.designsbee.com/
I can't see the given code in the step 2...So Can you please add this widget to my blog manually?...And send the edited template to my email address...Thanks for your great posts..
ReplyDeleteMy website : http://www.islaamthetruth.blogspot.in/
Deletenot working ..... on implementing my blog .. http://techtalkseekers.blogspot.in/
ReplyDelete