Loop ignores “Show at most:” days setting
-
I have this loop on my page:
<?php if (is_home()) { query_posts("cat=2"); } ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <!-- <small><?php the_time('F jS, Y') ?> by <?php the_author() ?></small> --> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <!--<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>--> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div> <div class="alignright"><?php previous_posts_link('Next Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?>
In Options > Reading, I can change the number of posts shown and it displays correctly on the page.
When I change the number of days shown, though, it doesn’t work. The number of posts that shows up on the page does change, but it doesn’t seem to have anything to do with the actual dates that they were posted: if I enter 30 days in the admin, posts that are older than 30 days are still there. Is there something I need to change in my loop to get this to work correctly?
We’ll be upgrading soon, but I’d like to fix this first if I can. Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Loop ignores “Show at most:” days setting’ is closed to new replies.