Aug
4
Filed under: Asides | Tags: , | August 4th, 2008

Random Redirect Plugin

I just updated theĀ  Random Redirect plugin, with two extra parameters. 

Possibly related posts:

  1. Art Direction Plugin WordPress
  2. Plugin Competition The WordPr
  3. 4,000 Plugins WordPress.
  4. Community Tagging Matt

7 Responses

  • Chris Thomson | August 4th, 2008 @ 2:27 pm | Reply

    Nice one, Matt. This adds so much functionality and value to the plugin, in my opinion. I’m sure I’ll be adding a link to my blog using the random_cat_id parameter.

    Thanks for the update. :)

  • JD Hartley | August 4th, 2008 @ 2:58 pm | Reply

    Awesome! I have this on my photo blog. I edited it so that it would use “/random/” as well. Great plugin—thanks for sharing.

    Hopefully Blicki will be available soon… :P

  • HotForWords | August 4th, 2008 @ 11:55 pm | Reply

    I am at a total loss… how do I use one of the other parameters?

    I have tried http://www.hotforwords.com/?random_cat_id=3
    …/?random&random_cat_id=3
    …/?random_post_type=lessons

    and so many other options.. but don’t know how to make them work. Can you please show me?

    Thanks!
    Marina

  • c0o1 | August 5th, 2008 @ 9:42 am | Reply

    Hello, Matt.

    How can I use the random_cat_id parameter? I’d love an example.

    Thanks!

  • Aaron | August 6th, 2008 @ 6:59 pm | Reply

    For those that need help with it:

    For posts in a particular category: http://somedomain.com/?random=1&random_cat_id=3

    For specific post types:
    http://somedomain.com/?random=1&random_post_type=%type

    Where %type is either attachment, post, or page.

  • HotForWords | August 7th, 2008 @ 4:15 pm | Reply

    Here is how you do it:

    ?random&random_cat_id=3 or ?random&random_post_type=post

    Thanks JD @ jdh23.com !!

  • raT | September 15th, 2008 @ 8:25 am | Reply

    if you edit the random-redirect.php file and insert
    gthi code

    if ( isset( $_GET['random_post_day'] ) ) {
    $post_type = preg_replace( ‘|[^1-9]|i’, ”, $_GET['random_post_day'] );
    $query = “SELECT ID FROM $wpdb->posts WHERE post_date like ‘%$post_type%’ AND post_password = ” AND post_status = ‘publish’ ORDER BY RA
    ND() LIMIT 1″;
    }
    right before

    $random_id = $wpdb->get_var( $query );

    you may user

    http://somesite.com/?random&random_post_day=2008-09-12

    and you have a random post of the day

    If you have to many posts per day :)

Share your thoughts