The random post link addon for Blogger has now been updated to better and faster than ever before.
Basically this script creates a text link to a random post on your blog. It displays the random post's title as well as a brief random message to accompany it.
The major changes between this updated version and the current version are:
The addon no longer requires the Archive Widget to be added to your page.
The code is no longer limited to displaying posts from the past three months. It can now give you links to posts from your blog's entire history.
You can see the code in action at the top of the post area here at Inkweaver Review. Just refresh the page a few times to see a variety of random links to posts I've written in the past.
Removing Inkweaver Review Advertisment
You may notice that about one out of every ten random links is not to a blog post but back to Inkweaver Review. I would appreciate it if you left this, as it shows appreciation for the time and effort that I went to to create this script. However, you may not like the effect. There are two options you might want to take.
First, you can make the advertisement appear less often by simply adding more of your own custom messages to the list of random messages.
Find the section of code:
var introArray = new Array(
"Have you read ^?",
"Check out ^.",
"Look at ^.",
"Just for you: ^",
"Please look at ^.",
"Would you like to read ^?",
"You might enjoy reading ^.",
"Do you want to read ^?",
"Please read ^.",
"Random link powered by <a href="http://inkweaver-review.blogspot.com/"></a>"
To add another message just copy one of the lines in the middle, and paste it again in the middle. If you want to customize the message, just keep in mine that the caret "^" is where the random link is inserted.
If you want to remove the link back to Inkweaver Review completely, just remove the last message in the list. After you remove this message, be sure to remove the comma at the end of the new last message. If you remove the link back to Inkweaver Review then please add another link somewhere. Perhaps add me to your blogroll, or else write a post about the addon with a link to this page.
Limiting Number of Posts Used
Another customization that you may want to do is limiting the number of posts that the script can choose from. As it is the script will display links to any of your posts up to the 99999th post. You may want to limit it to the last 100-200 posts for several reasons. For one thing your oldest posts might be out of date, or their writing quality might not be as good as your new posts. But another reason why you might want to reduce the number of posts is load time. Loading a list of all the posts you have ever written on the blog can be time intensive for older blogs. So to reduce the number of posts that the script will choose from find the number 99999 in the code that you added to the XML template and change it to a smaller number. For example, the number 100 will limit the results to the last 100 posts that you have written.
I sincerely hope that this Blogger addon can be of help to you. If you encounter any issues please let me know by commenting here, and I will do my best to get back to you as soon as possible.