I have a static page which runs two loops but pagination doesn't work on the second loop.
- The first loop shows the static content of the page
- The second loop shows the last 3 blog posts
Pagination shows up, adds /page/2 to the url but it always shows just the same 3 posts. Why doesn't this work as expected?
First loop: display the static content
if (have_posts()) : while (have_posts()) : the_post();
the_content('<p class="serif">Read the rest of this page »</p>'); ?>
endwhile; endif;
Second loop: shows the last 3 posts and pagination
global $more;
$more = 0;
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query(array('post_type'=>'post','post_status'=>'publish','showposts'=>3,'paged'=>$paged));
while ($wp_query->have_posts()) : $wp_query->the_post();
the_content();
endwhile;
next_posts_link();
previous_posts_link();