Classifieds

Community Bulletin Board

BOULDERING TOUR –  CAMPING AREA –  EVENT –  FOR SALE –  GEAR RENTAL –  GENERAL AD –  WANTED  –  LODGE – PET SITTER –  RESTAURANT – LOST – FOUND

Post            Manage

add_action(‘init’, ‘wp_surprise_me_redirect’); function wp_surprise_me_redirect() { if (isset($_GET[‘surprise’]) && $_GET[‘surprise’] == 1) { $random_post = get_posts(array( ‘numberposts’ => 1, ‘orderby’ => ‘rand’, ‘post_status’ => ‘publish’ )); if (!empty($random_post)) { wp_safe_redirect(get_permalink($random_post[0]->ID)); exit; } } }