Tuesday, January 20, 2009

Weekly Widget: Random Rotating Posts for Blogger

The Random Rotating Posts widget from The Blog Doctor displays and links to a randomly selected post from your Blogger blog every five seconds. It's easy to install--don't let the long list of code throw you off; it's just cut and paste).

To install, simply copy the CSS/html code you see here. Go to your Blogger dashboard and add a new html/java gadget. Paste the code in and change the words MYBLOG in the script to your blog's url (erase the ".blogspot" part if you need to) and replace BLOG_TITLE with your blog's title. The widget will fit best above your posts, so drag it there to start. Save, and you're done.

If you don't like the default colors, font, font size, etc., you can fiddle with the CSS and customize to your heart's content.

This is a great widget if you have a lot of content that remains relevant no matter how long ago it was published. If you're a "deal" blogger and tend to post time-sensitive posts, it's probably not for you. However, if you use labels you can limit the posts that are shown to those with a particular label by grabbing the feed for a particular label (they look like this: http://BloggerBlogUrl/feeds/posts/default/-/LabelName) and use that instead of what's in red here:

function showGadget() {
var feeds = [
{title:'title',
url:'http://MYBLOG.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=999'},

Here's how the widget looks at The Blog Doctor:

The font size is a little huge for my taste, but again, you can change that easily in the CSS portion of the code. You can see the widget with my modifications saved as an image below. I've changed the feed url as mentioned above so that the widget only displays random posts that are labeled "tools."

If the Rotating Posts widget is a bit much for you, try Blog Doctor's Rotating Post Title Widget.

RSS