You could create a variable, maybe called “random_posts.”
Create a link to http://yoursite.com/?random_posts=true
In your index.php file, you can check to see if random_posts is set like so:
<?php if ($_GET['random_posts']) {
showRandomPostsThingie();
} ?>
obviously, you’d want to integrate this into the “if ($posts)” conditional, so that only the random posts would be shown.
That should give you the general idea of how to do it.
thank you for that, mark..
i played around with your suggestion for a while.. it looks completely correct and useful–if only i knew the proper syntax to make the rest of the wordpress php code mix in with it. but i guess i’ll learn/figure that out eventually…
i’ve realized:
- i’m really going to have to learn php sooner than later to do what i’d like to do with wordpress
- while Alex’s plugin is great, i’m looking for something that can reproduce the entire post–author and all… so probably something that can return an entire container/div-enclosed section/include of all the pieces that make up the view of “one post” (author, permalink, date, title, content, comment-link, etc.)