Title: Multiple Loop Question
Last modified: August 18, 2016

---

# Multiple Loop Question

 *  [khaled](https://wordpress.org/support/users/khaled/)
 * (@khaled)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/multiple-loop-question-1/)
 * Ok, so the multiple loop is up and running, I’m just having a bit of trouble 
   trying to make it do something. I know it can be done (because I’ve done this
   before) but I think I did this using a plugin. I’m pretty sure this can be done
   using just the wp tags, just not sure how to go about it.
 * I’ve got two loops. The first lets call it featured, while the second is basically
   a list of posts. When several posts within the second loop get posted in the 
   same day, they should be placed under the same date tag.
 * So basically the structure I’m thinking about is this:
    First Loop{ Title of 
   Post Date of Post main post}
 * Second Loop{
    Date of posts First Post (not main post) second post (posted on
   same day as first post)
 * Date of posts
    Third Post (posted on a different date to the first two posts)}
 * Directly from this page:
    [http://codex.wordpress.org/The_Loop](http://codex.wordpress.org/The_Loop)
 * ` <?php $my_query = new WP_Query('category_name=featured&showposts=1');
    while(
   $my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->
   ID;?> <?php the_time('jS F, Y') ?> <?php the_title(); ?> <?php the_excerpt();?
   >
 *  <?php endwhile; ?>
    <!-- Do other stuff... --> <?php if (have_posts()) : while(
   have_posts()) : the_post();  if( $post->ID == $do_not_duplicate ) continue; update_post_caches(
   $posts); ?>
 *  <?php the_excerpt(); ?> 
    <?php endwhile; endif; ?>
 * Now the question is how do I modify the second part of the loop so that it doesn’t
   have the date for show up for every post. It collects them for that particular
   day?

Viewing 1 replies (of 1 total)

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/multiple-loop-question-1/#post-449451)
 * Maybe this topic helps:
    [http://wordpress.org/support/topic/81731?replies=7](http://wordpress.org/support/topic/81731?replies=7)

Viewing 1 replies (of 1 total)

The topic ‘Multiple Loop Question’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [multiple](https://wordpress.org/support/topic-tag/multiple/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Samuel B](https://wordpress.org/support/users/samboll/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/multiple-loop-question-1/#post-449451)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
