Random Link Button


The Random Link Button plugin give you the ability to place a button on your blog that directs the user to a random site every time it is pressed. The random link is chosen out of your WordPress blogroll, so you can make use of your existing links.


1. Download the plugin file, unzip and place it in your plugin folder.
This makes the plugin available to WordPress and it should now appear in your Plugin folder. The zip file also includes a couple of images you can use as buttons.

2. Activate the plugin
This “starts up” the plugin, making it available to your presentation files (you know, the ones that make up your theme). At this point, the plugin is active, but WordPress doesn’t know where it should be displaying the Random Links Button

3a. Add this snippet to your theme: <?php randomlinkbutton(); ?>
This tells WordPress where to put the button.

3b. Alternatively, the plugin is also widget-aware and will appear in your widget list.

4. Configure the plugin
The plugin can be configured both from the widget control area as well as from a new panel in the Options menu


The plugin can be used in one of two ways:If you are using widgets, just drag the widget onto the area of the page where you want it to appear.If you aren’s using widget, add the following code: <?php randomlinkbutton(); ?> to your template where you would like the button to appear.




v0.1: Base release. Category functionality not yet implemented, otherwise works as per spec.

v0.2: Widget release. Added by mooger. Cheers!

v0.3: Added non-widget code, moved actual code to shared area. Added admin for non-widget users. Renamed from Random Link to Random Link Button. Packaged as ZIP with sample images

v0.4: Addition of category selection drop-down and target

v0.5: Brought to to date with WP 2.1 (using common functions instead of database calls)

Websites using this plugin

I love it when people use my work, so I thought I’d add a list of links to websites using this plugin. If you’re not on the list, just add a comment and I’ll add you in!


  1. Hello,
    awesome plugin!!!
    You can take a look of it on my sidebar 😉
    “un link a caso” is for random link in Italian language.



  2. Hi there,

    I’m new to all this so forgive if this questions seem silly but…

    Is it possible to change the graphic of the button?
    And is it possible to prioritise some links to show more frequently than others?

    Thanks for your help.

  3. @lil’ mephisto: Ths plugin comes with 2 graphics. If you add any more images to the folder that they live in, they will automatically appear in the drop-down where you configure the plugin.

    Re prioritisation: There’s nothing in the plugin to do that at the moment. I’ll keep it in mind for the next version though.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.