query_posts adds improper posts to category archive
-
I’m trying to limit the number of posts that show up on a category’s archive page. I used query_posts in the category’s template file and now posts from different categories are displayed on the category’s archive page and too many posts are still being displayed.
I added this near the top…
<?php query_posts('showposts=5'); if (have_posts()) : ?>
and this near the bottom…
<?php endif; wp_reset_query(); ?>
and the archive page http://www.social-ecology.org/category/biodev/
lists 7 posts (not 5) and includes posts that aren’t in the biodev category.Can anyone tell me what’s going on here?
Thanks!-Alec
The topic ‘query_posts adds improper posts to category archive’ is closed to new replies.