Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'posts_per_page' => 1,
- 'orderby' => 'rand'
- );
- $random_redirect = new WP_Query ( $args );
- while ( $random_redirect->have_posts () ) {
- $random_redirect->the_post ();
- wp_redirect ( get_permalink () );
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement