How To Easily Add Related Post Widget To Blog

Posted by: Shahabz Malik on 17 February 2013 Under:
Our ABT team recently changed the related post widget, officially released by linkwithin, to new widget that is customized by me and is working great. The default JavaScript is given by Mike, admin of More Tech Tips, we have just modified it so that it can easily get integrate with our blogging theme. The official linkwithin widget that we previously used on our blog, was showing the related post of different blog that's why we immediately took the action to remove this widget. In this tutorial we are sharing related post widget that currently is on our blog, you have to place small code in blogger template or you can see its demo at bottom part of the blog post, if you like this widget then follow the steps.

How To Add Related Post Widget

Log in to Blogger dashboard, and go to Layout, choose Add a Gadget and select HTML / JavaScript place following code within it.
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<style type='text/css'>
#related-posts h2
  { color:red;
    border-bottom:0;   
}
#related-posts img
   {width:15px;
    height:15px;
}
 
</style>
<script src='http://blogger-related-posts.googlecode.com/files/related-posts-widget-1.0.js' type='text/javascript'/>
<script type='text/javascript'>
relatedPostsWidget({
   &#39;containerSelector&#39;:&#39;div.post-body&#39;
   ,&#39;loadingText&#39;:&#39;loading...&#39;
});</script>
</b:if>
Just save it and see the result nothing more you have to do with it. But it will display a maximum of 5 results because the JavaScript code that control its numbering are on Google code so you have to download this file and change that number and then again upload it to your Google code from your account but there is no need for this I think 5 related results for your post are enough.
Further comments and suggestions are open:))


If you enjoyed this article then kindly take 5 seconds to share it!!

7 comments for How To Easily Add Related Post Widget To Blog

  1. Also you can use from here to add more than 5 related posts and many keywords related:

    http://blogger-related-posts.googlecode.com/svn/v2/setup.htm

    Regards
    http://zyxaw.com

    ReplyDelete
  2. hi dear can you send me good like templates for blogger that infolinks site approved please send me templates at my email ID thaks
    email ID is arshad2k9@gmail.com

    ReplyDelete
  3. that is my blogger http://www.arshadabbsi.blogspot.com

    ReplyDelete
    Replies
    1. There is no need to face much problem to approve account with infolinks. Just write some quality content on your blog and then reapply.

      Delete
  4. related post widget plays an important role in engaging the user and also to increase traffic.even those posts that did not get good amount of traffic gets clicked because of the same labels and hence hardwork of admins and writer gets rewarded.so i will say it is like a traffic booster.Related post widget for blogger

    ReplyDelete
  5. this is awesome..related post widget helps too much for getting more and more traffic for numb posts.it is like making burning stones out from the mouth of volcano.there are lots of posts which user does not pay attention so here related post widget will help like engaging user for some amount of posts .thanks for sharing.shayari

    ReplyDelete
  6. This tutorial is the simplest way but I just can't figure out why it doesn't work on my blog techandgio.blogspot.com, I will try another tut in the web.

    ReplyDelete