Using multiple loops
-
I was reading up on the codex, and a few articles on multiple loops that was posted by infovere and ifelse- I may have to do something like this by using the loop several times in pages.
I’ve used the following example:
<?php $my_query = new WP_Query('category_name=film&showposts=1'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
// Do stuff.
<?php endwhile; ?>The result just displays “do stuff” https://reviews.sekhu.net/. What I’m trying to do is call 1 post from each cat for each box. Take into account there is no other code apart from some content and css, nothing more – no loop etc. I would like to use this method, but in this instance use an excerpt with multiple loops? WOuld this work? If so how?
- The topic ‘Using multiple loops’ is closed to new replies.