How to create a random post button (WordPress not self-hosted)

This is REALLY easy. All you need to know is:

The link to a random post for your blog is your web address /?random

As an example, the random post address for my blog is

The random post option under Blog info on the WordPress top bar

Here's the random post button people logged into WordPress can see

How did I find this out? If you’re logged in to WordPress at the moment you’ll see the usual dark grey bar at the top with the drop down options. Under ‘Blog Info’ there’s a Random Post option. Hover over it in Internet Explorer and the destination URL is shown in the bottom left.

The Windows 7 taskbar with Internet Explorer 9 open, showing the destination URL for a random post button

/?random, see?

How do you make it into a button? Obviously, you can post the link and people can click on it to get a random post, but that’s not really what most people reading this post will be looking for. You know how to give a picture a link, so the best way to make a random post button is to upload a random post picture and give it a link. (On a self-hosted WordPress site you can edit the HTML, CSS and goodness knows what else, giving yourself a really professional looking button which may even play a sound when you hover over it or something!)

The image widget options

Make sure you use the right picture and link, then play around with the settings

If you want one of these buttons on every post you could save yourself a lot of trouble and just put it in the sidebar. To do this, use the image widget.

My random post button (currently) uses the settings in the picture on the left. 100 by 100 was the best size I could find, and I used a caption rather than a widget title.

I hope that helped! If so, feel free to comment, like, Facebook like, tweet, bookmark, share, subscribe, browse, re-blog (but not copy), and/or vote up!

A question mark over a binary background

My random post button


About Matt

I like writing, filmmaking, programming and gaming, and prefer creating media to consuming it. On the topic of consumption, I'm also a big fan of eating.
This entry was posted in My work, Pictures and tagged , , , , , , , . Bookmark the permalink.

3 Responses to How to create a random post button (WordPress not self-hosted)

  1. Tnx! Very useful!

  2. Doesn’t seem to work on my blog? Am I doing something wrong?!?

    • Matt says:

      I notice your blog isn’t, which may be why it doesn’t work. Do you have a wordpress bar at the top of the page when you visit your site as an admin? If there’s a random post button on there with a URL you could try following that one instead

Enter comment:

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s