How to add Related Posts widget/Plugin to Blogger?

I was Wondering to find out the way to add related post widget to my blog and found many 'Related Posts' solutions for blogger platform, like the one I have on my blog.

But the thing I don't like is that most of the widgets display all those post with same tags. This will result the big list of related post in the end of your post. Finally, I have discovered an excellent solution to this, which only requires 3 lines of code to be embedded in the template.

Let's see how to implement this excellent way to show related posts in blogger. (Thanks to mintblogger)

Displaying Related Posts Below Blog Posts

Alternatively, you can choose to display related posts below each blog post. To implement that following these 3 simple steps.

1. Open your blog template the find the following line in the template.

<div class='post-footer-line post-footer-line-3'/>
...
</div>

2. Just below this code add a line of code like this.

<div class='post-footer-line post-footer-line-3'/>
...
</div>
<div id='related_posts'/>

3. Go to end of the template and find </body> tag. Just above this tag add the following two lines of code.

<script src='http://www.google.com/jsapi'/>
<script src='http://brps.appspot.com/brps.js' type='text/javascript'/>
</body>
______________________________________________________
Now save the template and view your blog. This script will show a maximum of 10 related posts. The execution time is very less because the data is cached by the script on the server.

0 comments:

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan