colourcolourcolourcolourcolourcolourcolour
Forgot my colour selection

Random Redirect With Pretty URLs And WordPress 2.5

I didn’t realise that upgrading WordPress would break the pretty random redirect plugin that I modified, but it was brought to my attention today that it did. So, I set about trying to fix it.

The solution I came up with was to create a page with the permalink “/random/”, so that I could apply a page template to it.

Grab my page template: Source, ZIP. Upload it to your active theme directory.

Now you need to create a page called Random. You can fill it with any text you want, because no-one will see it anyway.

WordPress Page Template

At the bottom of the WordPress edit page panel, under Advanced Options, select the random redirect page template.

You now have a fully functional /random/ page that will redirect you to a random post on your site when someone visits it, and the page will show up on any page lists you have on your theme, meaning you don’t have to manually add the link.

Now wasn’t that easy?

Posted on March 30th, 2008. Filed under Random, and tagged with , , , , , .

Leave a Comment

Make yourself heard

Reader Comments

One response so farLeave a comment

Montly Post Archives

Posts from previous months