Trouble with query_posts
-
I’m working on a custom theme, and want to generate archive pages showing all entries for the selected time period or category one one page, no pagination. The codex helpfully provides this code sample:
<?php query_posts($query_string.'posts_per_page=-1'); while(have_posts()) { the_post(); <!-- put your loop here --> } ?>
This is not working according to plan. Date archives behave as before: paginated. Category archives (which are generated from the same template) do not produce any output for the loop. I’ve even borrowed the “archive.php” file from the default template, added the line
query_posts($query_string.'posts_per_page=-1');
to it, and gotten the same results.thanks in advance for any help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Trouble with query_posts’ is closed to new replies.