WordPress.org

Support

Support » How-To and Troubleshooting » Archive – posts for a particular month.

Archive – posts for a particular month.

  • This’ll maybe seem like an unbelievably dumb question, and it’s probably poorly worded. Clearly I need to take a break and return fresh, but meanwhile…

    In my archive.php template, the code for showing posts from a particular month is:

    <ul>
    <?php query_posts( $query_string . '&posts_per_page=-1' ); ?>
    <?php while (have_posts()) : the_post(); ?>
    <li><?php the_time('j'); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endwhile; ?>
    </ul>

    It seems clumsy, and I’m wondering what’s the default template/code WP uses (in all those sidebar archives) to deliver a page of posts for a particular month.

  • The topic ‘Archive – posts for a particular month.’ is closed to new replies.
Skip to toolbar