)
}
}
)
(
}
{
)
)
(
)
(
(
{
}
)
(
)
}
)
)
{
(
(
)
)
}
)
(
}

Link to Random WordPress Post

  1. $p = get_posts(array('orderby' => 'rand', 'showposts' => 1));
  2. 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 😀

// php // wordpress
snippet.zone ~ 2021-22 /// {s/z}