Aug
4
4
Filed under: Asides | Tags: WordPress (106), plugins (5) | August 4th, 2008
Random Redirect Plugin
I just updated theĀ Random Redirect plugin, with two extra parameters. ¶
Possibly related posts:
- Art Direction Plugin WordPress
- Plugin Competition The WordPr
- 4,000 Plugins WordPress.
- Community Tagging Matt

Chris Thomson | August 4th, 2008 @ 2:27 pm |
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 |
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…
HotForWords | August 4th, 2008 @ 11:55 pm |
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 |
Hello, Matt.
How can I use the random_cat_id parameter? I’d love an example.
Thanks!
Aaron | August 6th, 2008 @ 6:59 pm |
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 |
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 |
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