The Random Posts Widget is designed to expose readers to content they might otherwise never come across. Instead of searching Google or digging through the archive visitors discover new things through serendipity. This adds value for users and generates more page views for a blog. It's important to organize the blog well, but Random Posts are an excellent way to help readers explore a blogs content.
Add Random Posts to your Blog
The Random Posts Widget is easy to install, but requires some basic script configuration to function efficiently for users. Start by clicking the button below, then click on Edit Content to view a screen like this:
Configuration Options
You must set FIRST_YEAR, FIRST_MONTH and FIRST_DAY to match the blogs first post. This is required to limit the amount of information the script deals with. Otherwise, as a blog matures some posts may slip through the cracks never to be seen again and visitors could experience performance problems. In the example above January 1, 2011 is the date of the first posting. The three additional options are set to default values, see the comments on each for further information.
Advanced Options: Styles
My Random Posts widget defaults to styles appropriate for the design of this blog at the time of posting. In order to make the look and feel your own, you should consider some customization. A little further down in the code pictured above you'll find these styles, alter them to find a look that works for your blog:
.random-template{ font-size: 11px; padding: 5px;} - Style for each random postSummary
.random-template:hover { background-color: #ffffff;} - Background when a visitor hovers over a post
.random-template h4{ font-weight: normal; color: #ffffff; font-size: 11px; background-color: #555555; padding: 0px 5px;} - Style of the Date line
.random-post-thumb img { max-height: 50px; max-width: 50px;} - Limits the size of Thumbnails
Random Posts are a great way of exposing visitors to long forgotten posts. Each page view brings a chance to discover new and interesting things. I recommend using this as one of many tools to add value for readers and improve the longevity of your posts. Please give the widget a try and contact me either here through comments or @JSBlogStop on twitter with any questions or comments.
6 comments :
Thanks! I'm using the widget here:
Morning Strikes Now!
One note -- since I switched the variable RANDOM_FORMAT from THUMB to SUMMARY, I had to change this line to get the MAX_LENGTH variable to be used:
From:
if(RANDOM_FORMAT == SUMMARY) {
$(idPost + " .random-post-body").html(Entry.summary.$t + "...");
To:
if(RANDOM_FORMAT == SUMMARY) {
$(idPost + " .random-post-body").html(Entry.summary.$t.substr(0,MAX_LENGTH) + "...");
It's been a while since I wrote this, but if I remember correctly I intentionally set it up that way. Basically, I made the decision to use the full summary text as it was given, since it's a snippet only anyway, rather than apply the length limitation. Sort of a personal preference I probably should have mentioned.
Cool widget, thanks for sharing it.
HD Cafe
Cool widget!!! I used it in my movie blog and I like it!!!
www.tainia.info
Really nice, cool and great widget. i searched the web for the whole day for my requirements, tried many and removed all but it met my all requirements, hats off to you sir!
Waris
Good One.. thanks.. My search ends here.
Post a Comment