Random Redirect 2

Wordpress Plugin

Click here to download

Description

This is an expansion of Matt Mullenweg’s original Random Redirect plugin which allowed you to create a link to link to yourblog.example.com/?random which would redirect the visitor to a random post or page on your website in a manner similar to StumbleUpon. Matt’s original plugin also allowed you to limit the randomness to specific categories and post/page status.

We have taken the original plugin a step further, with Random Redirect 2 you can specify `random_tag_id` or `random_year` or `random_month` or `random_keyword` too, giving you fine grained control of the level of randomness. In addition to the extra parameters, you can also combine parameters!

Installation

  1. Download the .zip file
  2. Unzip and copy the random-redirect-2 folder to your /wp-content/plugins/ directory
  3. Activate the Random Redirect 2 on your plugins page
  4. Create your random URL links

How to Use Random Redirect 2

Random

Some random page or blog post on your site.
yourblog.example.com/?random

Random Category

Based on category ID.
yourblog.example.com/?random&random_cat_id=8

Random Post Type

Post type can be ‘post’ or ‘page’.
yourblog.example.com/?random&random_post_type=post

Random Tag

Based on tag ID.
yourblog.example.com/?random&random_tag_id=5

Random Year

Will show a random post or page published within a specific year. Must be a 4-digit year, YYYY. If an invalid year is entered or a year in which no posts or pages exist, then the default result will be your latest blog post.
yourblog.example.com/?random&random_year=2011

Random Month 1

Will show a random post or page published within a specific month occurring in any year. Must be a 1 or 2 digit month, M or MM. Valid numbers include 1-12 (i.e. 12 months per year). If an invalid month is entered or a month in which no posts or pages exist, then the default result will be your latest blog post.
yourblog.example.com/?random&random_month=5

Random Month 2

Will show a random post or page published within a specific month occurring in any year. Spelled out month can be all lower-case, all upper-case, or first letter upper case. If an invalid month is entered or a month in which no posts or pages exist, then the default result will be your latest blog post.
yourblog.example.com/?random&random_month=may

Random Keyword(s)

Will show a random post or page based a specific keyword or keywords. If multiple keywords are used in the same URL string the results will contain EACH keyword, which gives you very fine tuned results. Keywords can appear anywhere on the resulting webpage (i.e. sidebar, footer, body, header, navigation, etc.). Multiple keywords must be separated with a ‘+‘ sign.
yourblog.example.com/?random&random_keyword=red+leather+shoes

Combining Parameters Examples

Each of the above parameters can be combined, but each parameter must be separated with a ‘&‘ sign.
yourblog.example.com/?random&random_cat_id=8&random_tag_id=5
yourblog.example.com/?random&random_year=2011&random_month=5
yourblog.example.com/?random&random_cat_id=8&random_year=2011&random_month=may
yourblog.example.com/?random&random_year=2011&random_month=may&random_keyword=red+shoes