Link to Random WordPress Post
$p = get_posts(array('orderby' => 'rand', 'showposts' => 1));
echo '<a href="'.get_permalink($p[0]->ID).'">Random</a>';
I have been wanting to add a link to the header of this site that will randomly open a snippet zone post… Finally got around to it the other day – figured I’d post the lazy php code for it 😀