I'm having issues with my navigation (pagination) not function correctly. When I use Next or Prev it displays the same posts.
I'm hoping to query posts from 2 categories (3,4) and display them.
Here is the code:
<!-- Start the Loop. -->
<?php query_posts('showposts=4') ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post">
<!-- Display the Title as a link to the Post's permalink. -->
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<!-- Display the Time. -->
<strong style="margin-bottom:5px;"><small><?php the_time('F jS, Y'); ?></small></strong>
<!-- Display the Post's Content in a div box. -->
<div class="entry">
<?php the_excerpt(); ?>
</div>
<!-- Display a comma separated list of the Post's Categories. -->
<p class="postmetadata"><?php the_tags('Tags: ', ', ', ''); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>Posted by <?php the_author() ?> on <?php the_time('F jS, Y') ?>
<div class="hr"></div>
</div><!-- closes the first div box -->
<!-- Stop The Loop (but note the "else:" - see next line). -->
<?php endwhile; else: ?>
<!-- The very first "if" tested to see if there were any Posts to -->
<!-- display. This "else" part tells what do if there weren't any. -->
Sorry, no posts matched your criteria.
<!-- REALLY stop The Loop. -->
<?php endif; ?>
<div class="navigation">
<div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
<div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
</div>