Archive template doesn't work after changing number og posts
-
Hello!
I have custom post type called recipes and I created template “archive-recipes.php”.
It works normally until I change number of posts:
<div id="content"> <?php if (have_posts()) { ?> <?php global $query_string; ?> <?php query_posts($query_string . '&posts_per_page=2'); ?> <?php while(have_posts()) { the_post();?> <div class="post"> <h2><?php the_title(); ?></h2> </div> <?php } ?> <?php } ?> <div id="pagination"> <div class="next-posts"><?php next_posts_link('? Older Posts') ?></div> <div class="prev-posts"><?php previous_posts_link('Newer Posts ?') ?></div> </div> </div>
Does anyone has idea what is wrong there?
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Archive template doesn't work after changing number og posts’ is closed to new replies.