Posts Tagged ‘Wordpress hacks’

Quick random WordPress post hack December 26, 2009 No Comments

A friend of mine, Dima, was looking for a plugin that’ll make it possible to link to random post for his new site, shlat.im. He told me over IRC that he couldn’t find any simple plugin to do it, and I replied with this quick hack: <?php require(’wp-load.php’); header(’Location: index.php?p=’.$wpdb->get_var(’SELECT ID FROM ‘.$wpdb->posts.’ WHERE post_type=\’post\’ [...]