Feed on
Posts
Comments

to get a random post from your wordpress blog, use this little php snippet:

<?php
$rand_posts = get_posts(‘numberposts=1&orderby=rand’);
foreach( $rand_posts as $post ) :
?>
<a href=”<?php the_permalink(); ?>”>Chance</a>
<?php endforeach; ?>


Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS

More blogs about http://desk.stinkpot.org:8080/tricks.