WordPress: Create a random post icon

wordpress icon

Click for random post

It’s easy to post a link in a text widget in your wordpress blog’s sidebar that when clicked will display a random post found in your blog. You can use anchor text or not. Simply place the code into a text widget and display it at the top of your blog’s sidebar for reader convenience.  But did you know that the random post URL can be linked to an image of your choice? This post is a step by step tutorial for wordpress beginners.

Here’s just a little easter egg for you to play with: Try adding ?random to the end of your WordPress.com URL and it will redirect you to a random post on your blog. You can link to that address like any other, either in your post or a widget. Update: Based on a suggestion in the comments, I’ve added this to the admin bar so when you’re logged in and you hover over “Blog Info” the first menu item is a random post link. — Get Random

Simply replace example URL with  the Random Post link in the choice you make below.

Example 1 link without anchor text:

http://example.wordpress.com/?random

Example 2 linked to anchor text: Click for random post

<a href=”http://example.wordpress.com/?random”>Click to read a random post</a>

Example 3 linked to an image:

Draft post

  1. Create a draft post that you will later delete.
  2. Select a small image to link to and upload it into your Media Library.
  3. Fill in the Alternate Text.
  4. Type “Click for random post” into the Caption.
  5. Fill in the Description.
  6. Hover over “Blog Info” on the Admin bar and a dropdown menu will appear.
  7. Hover over “Random Post” and copy the URL onto your clipboard.
  8. Paste that URL into Link URL
  9. Click the “Insert into post” button and when that it complete click the X to close the image details box and return to your draft post.
  10. Switch to the HTML edior and copy the image code provided there onto your clipboard.

wordpress image detail box

Text Widget

  1. Proceed to Appearance > Widgets select a text widget and drag and drop it into the position in your sidebar that you want it to appear in and open the widget.
  2. Paste the code you copied out if the HTML editor into it.
  3. Click “Save” and “Close
  4. View the front of your blog. Click your tmage and view a random post.
  5. Delete the draft post as you are done.

26 thoughts on “WordPress: Create a random post icon

  1. Pingback: 6 Easy Ways to Feature Older Content « one cool site

  2. Cool idea. Read it. Re-read it. Got it. Did it. Neat. Thanks.
    PS – Love WP help – and appreciate your contribution (run across it often). Thanks again!

    • Hi Zeenat
      I adore the image you used. It’s perfect for your blog. I clicked it and read your post on gratitude. I need a reminder so I’m glad I tried it out.
      ♥ TiTi

  3. HI TiTi,
    This is such a neat idea! I might just give it a go…I love adding useful widgets to the blog :)
    I’ll come back and tell you when I add it… :)
    Love and hugs,
    Z~

Your comments are welcomed. Please submit them here.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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