Related Post Widget - Blogger / Blogspot

Much has been discussed about this. Lot of posts in the internet discuss about related post widget for blogger. There are some workable solutions posted by Hoctro elsewhere in the web. But, I somehow felt that those widgets were relatively slow to load and often crashed by Firefox / IE. So, I decided to write one related post widget on my own, using the Google Ajax Feed API. I must really thank Google for this before I move any further. The documentation on the Ajax Feed API and the Code Playground offered by Google are really good and would help anybody with less Javascript knowledge to get going. So, let us get going on this Widget. I'm going to present the Javascript code alone and give you a working link of this solution. Once I completely fix the code, I will give post a working solution which can be plugged in.

The related post widget works on the principle of identifying all the labels of a blog and then use a feed API call to load all related posts.In order to develop a related post widget for blogger this is what we need to do:-

5) Use document.write method and post them under "related posts" for the blogger.

This method is amazingly fast and I'm not experiencing any crash so far when trying to use this. in my test blog site. I will present the code snippet for each of these and also present the final code for use in blogger. Keep watching this site for more.

The final widget code is available here.

No comments:

Post a Comment