title: Wordpress Grid PHP
body: <p>I have an issue with adding a Grid Layout to my Projects here is the code: </p>
  
  <pre><code>&lt;?php while ( have_posts() ) : the_post(); ?&gt;
      &lt;?php
          $args = array(
              'post_type'      =&gt; 'projects',
              'posts_per_page' =&gt; 2,
          );
          $q    = new WP_Query( $args );
      ?&gt;
  
      &lt;div class="row"&gt;
          &lt;?php while ( $q-&gt;have_posts() ) : $q-&gt;the_post(); ?&gt;
              &lt;div class="col-6"&gt;
                  &lt;h3&gt;
                      &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;
                          &lt;?php the_title(); ?&gt;
                      &lt;/a&gt;
                  &lt;/h3&gt;
                  &lt;?php the_excerpt(); ?&gt;
              &lt;/div&gt;
          &lt;?php endwhile; ?&gt;
          &lt;?php wp_reset_postdata(); ?&gt;
      &lt;/div&gt;
  
  &lt;?php endwhile; ?&gt;
  </code></pre>
  
  <p>And its Looks like this: <a href="https://i.stack.imgur.com/e6Pzx.png" rel="nofollow noreferrer">The Image</a>. It's simply repeats the 2-column Grid as many time as I have posts. </p>
  
  <p>Can anyone help me to fix this, to get a normal Grid layout for my projects? </p>
  
  <p>Thanks!</p>