title: PHP: Break loop and then continue?
body: <p>I'm having a problem with the WordPress posts loop. I'd like to break down the post loop, to add some HTML div tags in the post. For example, I'm trying to add a div <code>.wrap</code> around the posts after first post. As it's to wrap the posts, so it should be only once.</p>
  
  <p>The problem is that the <code>.wrap</code> div is being repeated because of the loop. How can I break the loop, and add the <code>.wrap</code> div only once and then continue the loop?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>while ($wp_query-&gt;have_posts()) :
  
      $wp_query-&gt;the_post(); 
      if($wp_query-&gt;current_post &lt;= 1){ ?&gt;
          &lt;div class="x"&gt;
          .. post 1
          &lt;/div&gt;
      &lt;?php }
      if($wp_query-&gt;current_post &gt; 1){ ?&gt;
          &lt;div class="wrap"&gt; &lt;!-- should be only once --&gt;
              &lt;div class="y"&gt;
              .. post 2
              &lt;/div&gt;
  
              &lt;div class="y"&gt;
              .. post 3
              &lt;/div&gt;
          &lt;/div&gt;&lt;!-- should be only once --&gt;
      &lt;?php } ?&gt;
  
  endwhile;
  </code></pre>