I want to show few random posts at the end of each single post. I found this code for this purpose.
<div>
<h2>Random Posts</h2>
<ul>
<?php
$args = array( 'numberposts' => 5, 'orderby' => 'rand', 'post_status' => 'publish', 'offset' => 1);
$rand_posts = get_posts( $args );
foreach( $rand_posts as $post ) : ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
</div>
But the problem is that when I use this code on my site, it also cause the random output of next and previous post links present at the bottom of each post for better navigation.
I want to know how to terminate the effect of random posts so that pre and next post links are displayed in their original order.
Try
More info here : http://codex.wordpress.org/Function_Reference/wp_reset_query