SHOW:
|
|
- or go back to the newest paste.
| 1 | <?php | |
| 2 | $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
| |
| 3 | - | $temp = $wp_query; |
| 3 | + | $the_query = new WP_Query(array( |
| 4 | - | $wp_query = null; |
| 4 | + | |
| 5 | - | $wp_query = new WP_Query(array( |
| 5 | + | 'posts_per_page' => 2, |
| 6 | 'paged' => '$paged', | |
| 7 | - | 'posts_per_page' => '2', |
| 7 | + | |
| 8 | )); | |
| 9 | ||
| 10 | while($the_query->have_posts()): | |
| 11 | $the_query->the_post(); | |
| 12 | - | while($wp_query->have_posts()): |
| 12 | + | |
| 13 | - | $wp_query->the_post(); |
| 13 | + | |
| 14 | <article>POST STUFF</article> | |
| 15 | ||
| 16 | <?php endwhile;?> | |
| 17 | ||
| 18 | <div class="pagenav"> | |
| 19 | <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts', $the_query->max_num_pages ); ?></div> | |
| 20 | - | <?php wp_reset_query(); ?> |
| 20 | + | |
| 21 | </div> | |
| 22 | ||
| 23 | - | <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div> |
| 23 | + | <?php wp_reset_postdata(); ?> |