WordPress.org

Support

Support » How-To and Troubleshooting » mulitple looping

mulitple looping

  • i’ve read the codex about multiple looping.

    <?php while (have_posts()) : the_post(); ?>
    // my normal stuff
    <?php endwhile; ?>

    <?php rewind_posts(); ?>

    <?php while (have_posts()) : the_post(); ?>
    // Do other stuff.
    <?php endwhile; ?>

    Here’s my plan. When I click on a monthly archive or Category, it will show 5 most popular/most commented post in the first loop. The 2nd loop, it will show all the post in that month/category (permalink, not full post or excerpt).

    My question here is:

    1. how do i get the first loop to call out the popular/most commented posts in that certain month/category? is there a plugin to it?

    2. how do i get the second loop to call out ALL the post for that certain month/category, if my blog preference is set to display 10 posts per page?

    Thanks

  • The topic ‘mulitple looping’ is closed to new replies.
Skip to toolbar