3 posts per page
-
I have a file named category-9.php in my theme files, also in this category I have 10 “Dummy Lipsum” posts ??
I am trying to display 3 post per page only for this category but I can’t get the next/previous links to work correctly.
here is my code
<?php query_posts(‘cat=9&posts_per_page=3’); ?>
<?php if( have_posts() ) : ?>
<?php while( have_posts() ) : the_post(); ?><div class=”post” id=”post-<?php the_ID(); ?>”>
<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
<div class=”meta”><?php the_category( ‘, ‘ ); ?> <?php the_author(); ?> <?php the_time(‘F jS, Y’); ?></div>
<div class=”entry”>
<?php the_content(); ?>
</div>
</div><?php endwhile; ?>
<?php else : ?>
<div class=”error”>
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that isn’t here.</p>
<?php include( TEMPLATEPATH . ‘/searchform.php’ ); ?>
</div><?php endif; ?>
</div>
<div>
<div class=”alignleft”><?php next_posts_link(‘« Previous Entries’) ?></div>
<div class=”alignright”><?php previous_posts_link(‘Next Entries »’) ?></div>
</div>I also tryed <?php query_posts(‘cat=9&showposts=3’); ?>
but every time i get the firt 3 posts from category 9 when i press the next/previous links
- The topic ‘3 posts per page’ is closed to new replies.