Friday, September 30, 2011

Possibly Related?

"Related Posts" was a feature I really liked when I was using Wordpress.  It was a plugin that would automagically find and list posts that might be related to the current post you were viewing (by a complex scoring algorithm that took into consideration tags and post content).

I found a less complex, but still very useful snippet of javascript that approximates the same functionality over at blogger-related-posts.googlecode.com

The difference is that I chose to paste the code into a new widget instead of messing with the template directly.

The end result is a blank box at the very top of the left sidebar when you're on the main page that cycles through possibly related posts when you view a single post or filter by tag.  (the code had the text "Loading..." visible when there were no related posts returned, so I just erased that line.  If there are no posts, I'd rather just have an inconspicuous blank box)

No comments:

Post a Comment