Title: Multiple loop skipping first Post
Last modified: August 19, 2016

---

# Multiple loop skipping first Post

 *  [gazlawn](https://wordpress.org/support/users/gazlawn/)
 * (@gazlawn)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/)
 * Hey all, first time I’ve posted here as googling hasn’t found the answer for 
   once, I’ve been using the Perishable Press Triple Loop for WordPress which I’ve
   added an extra loop to.
 * At the moment the 2nd, 3rd and 4th loops are all working exactly how I want them
   to but the first loop, which should display everything is missing the latest 
   post.
 * **The loop breakdown:**
    Loop 1 – Displays everything Loop 2 – Displays only 
   posts from category 7 Loop 3 – Displays only posts from category 8 Loop 4 – Displays
   only posts from category 9
 * This is all stored locally at the moment so I can’t post a direct link but below
   is my loop from the homepage.
 * If anyone can help me it would be appreciated, or if people know of another solution,
   I’d love to hear it.
 * [http://wordpress.pastebin.ca/1856152](http://wordpress.pastebin.ca/1856152)
 * _[Code moderated as per the [Forum Rules](http://wordpress.org/support/topic/68664).
   Please use the [pastebin](http://wordpress.pastebin.ca/)]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452040)
 * Looks like you need to remove line 7:
 * `<?php while (have_posts()) : the_post(); ?>`
 * and its corresponding endwhile.
 *  Thread Starter [gazlawn](https://wordpress.org/support/users/gazlawn/)
 * (@gazlawn)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452081)
 * Genius, you are my new favourite person! Thanks!
 *  Thread Starter [gazlawn](https://wordpress.org/support/users/gazlawn/)
 * (@gazlawn)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452083)
 * Another little problem, In the first loop I want to separate the first post to
   a ‘feature’ div and the remaining posts to simply be a ‘post’ tag, I was thinking
   of doing this through the loops, but it means that the page nav will only scroll
   through the first loop.
 * **The loop breakdown:**
    Loop 1 – Displays everything – 9 posts (first styled
   differently) Loop 2 – Displays only posts from category 7 Loop 3 – Displays only
   posts from category 8 Loop 4 – Displays only posts from category 9
 * Thanks, and hope this makes sense.
 * [http://wordpress.pastebin.ca/1856458](http://wordpress.pastebin.ca/1856458)
 *  [reececom](https://wordpress.org/support/users/reececom/)
 * (@reececom)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452084)
 * If I understood your problem properly
    you can do this by setting the top post
   to a sticky then simply edit the css
 * .sticky {
    background: #c0d1f1; }
 * This would give the stickied post a light blue background.
    So it kinda works
   as a featured post
 *  Thread Starter [gazlawn](https://wordpress.org/support/users/gazlawn/)
 * (@gazlawn)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452086)
 * thats not quite what I’m after, but thanks, ‘feature’ is probably the wrong thing
   to call it, it needs to be the ‘latest’ post.
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452127)
 * Assuming you want the ‘latest’ div nested inside the ‘span-8’ div, I think you
   can set up Loop 1 like this:
 *     ```
       <div class="span-8"><div class='latest'>
                   <h2>Loop 1</h2>
                <?php if ( have_posts() ) : $counter=0; while ( have_posts() ) : the_post(); ?>
   
                   <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                   <?php the_excerpt(); ?>
                   <?php the_content(); ?>
                   <?php comments_template(); ?>
                   <?php if (++$counter == 1) echo '</div'; ?>
   
                   <?php endwhile; ?>
                   <?php posts_nav_link('','','&laquo; Previous') ?><?php previous_post('&laquo; %', '', 'yes'); ?>
                   <?php posts_nav_link('','Next &raquo;','') ?><?php next_post('% &raquo;', '', 'yes'); ?>
                   <?php else : ?>
                   <p>Sorry..</p>
                   <?php endif; ?>
             </div>
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Multiple loop skipping first Post’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/multiple-loop-skipping-first-post/#post-1452127)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
