title: How to correctly add in a row to bootstrap to fix grid system moving onto multiple lines
body: <p>I am using bootstrap to display the posts on my front page. I have my posts alternate between 2 rows of 3 posts and 1 large post.  Everything looked good except for the fact that I noticed that if there is a longer title or excerpt in one of the posts then the rest of the page would be messed up (example below). After researching I've noticed the best solutions are to use row and clear fix.  However every time I try adding a div of row I seem to be placing it in incorrectly. (I had some help constructing my front-page.php so I don't know the correct way to add it in) Can anyone help me correctly add in a div row into my front-page.php? I would appreciate it a lot, I've been trying to find a solution for weeks!</p>
  
  <p>I have tried looking at different solutions to questions on here but I still can't correctly change my own code. So if anyone can help at all it would be greatly appreciated.</p>
  
  <p>how it should look...
  <a href="https://i.stack.imgur.com/1Lj1H.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Lj1H.jpg" alt="enter image description here"></a></p>
  
  <p>how it looks when I have a post that has a title (or excerpt) that goes on to multiple lines...
  <a href="https://i.stack.imgur.com/hd0kD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hd0kD.png" alt="enter image description here"></a></p>
  
  <p>as you can see example post 12 moves all the way over to the right (where it should be on the left) example post 13 and 14 are moved underneath.</p>
  
  <p>my front-page.php</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
      /*
       * Template Name:
       */
  
      get_header();
      get_template_part ('inc/carousel');
  
      $the_query = new WP_Query( [
          'posts_per_page' =&gt; 14,
          'paged' =&gt; get_query_var('paged', 1)
      ] );
  
      if ( $the_query-&gt;have_posts() ) { 
  ?&gt;
  &lt;div id="ajax"&gt;
      &lt;?php
          $i = 0;
          while ( $the_query-&gt;have_posts() ) { 
              $the_query-&gt;the_post();
  
              if ( $i % 7 === 0 ) { // Large post: on the first iteration and every 7th post after... 
      ?&gt;
  &lt;article &lt;?php post_class( 'col-sm-12 col-md-12' ); ?&gt;&gt;
      &lt;div class="large-front-container"&gt;
          &lt;?php the_post_thumbnail('full', array('class' =&gt; 'large-front-thumbnail')); ?&gt;
      &lt;/div&gt;
      &lt;h2&gt;&lt;a class="front-page-post-title" href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
      &lt;p class="front-page-post-excerpt"&gt;&lt;?php echo get_the_excerpt(); ?&gt;&lt;/p&gt;
      &lt;div class="front-page-post-info"&gt;
          &lt;a class="moretext" href="&lt;?php the_permalink(); ?&gt;"&gt;Read more&lt;/a&gt;
          &lt;?php get_template_part( 'front-shop-the-post' ); ?&gt;
          &lt;?php get_template_part( 'share-buttons' ); ?&gt;
          &lt;div class="front-comments"&gt;&lt;?php comments_popup_link ('0', '1', '%', 'comment-count', 'none'); ?&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/article&gt;
  &lt;?php
  
  } else { // Small posts 
  ?&gt;
  &lt;article &lt;?php post_class( 'col-md-4' ); ?&gt;&gt;
  &lt;?php the_post_thumbnail('full', array('class' =&gt; 'medium-front-thumbnail')); ?&gt;
  &lt;h2&gt;&lt;a class="front-page-post-title" href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
  &lt;p class="front-page-post-excerpt"&gt;&lt;?php echo get_the_excerpt(); ?&gt;&lt;/p&gt;
  &lt;div class="front-page-post-info"&gt;
       &lt;a class="moretext" href="&lt;?php the_permalink(); ?&gt;"&gt;Read more&lt;/a&gt;
       &lt;?php get_template_part( 'front-shop-the-post' ); ?&gt;
       &lt;?php get_template_part( 'share-buttons' ); ?&gt;
       &lt;div class="front-comments"&gt;&lt;?php comments_popup_link ('0', '1', '%', 'comment-count', 'none'); ?&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/article&gt;
  &lt;?php
       }
           $i++;
       }
  ?&gt;
  &lt;/div&gt;
  &lt;?php 
      if(get_query_var('paged') &lt; $the_query-&gt;max_num_pages) {
         load_more_button();
      }
  }
  elseif (!get_query_var('paged') || get_query_var('paged') == '1') {
      echo '&lt;p&gt;Sorry, no posts matched your criteria.&lt;/p&gt;';
  }
  wp_reset_postdata();
  get_footer();</code></pre>
  </div>
  </div>
  </p>