Posted By

zealmurapa on 04/20/11


Tagged


Versions (?)

Multiple loops


 / Published in: PHP
 

  1. // First loop (get the last 10 posts in the "myVibe" category)
  2. <?php query_posts('category_name=myVibe&showposts=10'); ?>
  3. <?php while (have_posts()) : the_post(); ?>
  4. <!-- Do stuff... -->
  5. <?php endwhile;?>
  6.  
  7. //loop reset
  8. <?php rewind_posts(); ?>
  9. //Second loop (Get all posts)
  10. <?php while (have_posts()) : the_post(); ?>
  11. <!-- Do stuff... -->
  12. <?php endwhile; ?>

Report this snippet  

You need to login to post a comment.