Title: Multiple Loops &amp; Styles
Last modified: August 19, 2016

---

# Multiple Loops & Styles

 *  Resolved [mstg2000](https://wordpress.org/support/users/mstg2000/)
 * (@mstg2000)
 * [15 years ago](https://wordpress.org/support/topic/multiple-loops-styles/)
 * I’m looking to list my loop in two different styles on my index.php
    one just
   under the other. I found an article on multiple loops, but i’m finding it confusing
   and can’t get it to work.
 * I have my primary loop in an external “the_loop.php” ([seen here](http://kithicor.org/))
   
   I have my secondary loop in an external “the_archive_loop.php” ([seen here](http://kithicor.org/author/Jethal/))
 * So.. I’m looking for..
 *     ```
       <?php if (have_posts()) : ?>
       <?php while (have_posts()) : the_post(); ?>
       <?php include("the_loop.php"); ?>
       ~line break~
       <?php include("the_archive_loop.php"); ?>
       <?php endwhile; ?>
       ```
   
 * No specific category, just latest posts, no duplicates
    any easy fixes?

Viewing 1 replies (of 1 total)

 *  Thread Starter [mstg2000](https://wordpress.org/support/users/mstg2000/)
 * (@mstg2000)
 * [15 years ago](https://wordpress.org/support/topic/multiple-loops-styles/#post-2068256)
 * Never mind! Solved myown problem..
 *     ```
       <?php if (have_posts()) : ?>
       		<?php $my_query = new WP_Query('posts_per_page=6');
       		while ($my_query->have_posts()) : $my_query->the_post();
       		$do_not_duplicate[] = $post->ID ?>
       			<?php include("the_loop.php"); ?>
       		<?php endwhile; ?>
       			<!-- Do other stuff... -->
       			<?php if (have_posts()) : while (have_posts()) : the_post();
       		if (in_array($post->ID, $do_not_duplicate)) continue; ?>
       		<?php include("the_archive_loop.php"); ?>
       	<?php endwhile; endif; ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Multiple Loops & Styles’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [mstg2000](https://wordpress.org/support/users/mstg2000/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/multiple-loops-styles/#post-2068256)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
