try this:
<?php
query_posts( array( 'posts_per_page' => 2, 'cat' => '1', 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), ));?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<h4 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'cc' ) ?> <?php the_title_attribute(); ?>"> <?php the_title(); ?> </a></h4>
<small><?php the_category(); ?> </small>
<?php endwhile; ?>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', '' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', '' ) ); ?></div>
<?php endif; ?> </br></br>
<?php wp_reset_query();?>
no need to reset the entire query. just use wp_reset_postdata()
Exactly what i needed… Thank you for this 🙂
Thanks for that mark, still not clear on the difference, in a nut shell, what are the advantages, disadvantages of reseting the query vs. using post reset?