I've tried solutions posted here. https://stackoverflow.com/a/19695851/7244133
And this one... https://scotch.io/bar-talk/different-tricks-on-how-to-make-bootstrap-columns-all-the-same-height
None of these seem to work with the loop. Any ideas? Thanks!
<div class="container my-container">
<?php
$args=array(
'post_type' => 'post',
'category_name' => 'Business',
'posts_per_page' => 3
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
$i = 0;
while ($my_query->have_posts()) : $my_query->the_post();
// modified to work with 3 columns
// output an open <div>
if($i % 3 == 0) { ?>
<div class="row is-flex">
<?php
}
?>
<div class="col-md-4">
<div class="grid-loop">
<div class="custom-border">
<a class="perm_link" href="<?php the_permalink(); ?>">
<h2><?php the_title(); ?></h2>
<div class="blog-image image-responsive"><?php the_post_thumbnail('img-251x250'); ?></div></a>
<p><?php the_excerpt(); ?></p>
<span class="shortlink">
<button class="btn btn-success"><?php the_shortlink("Read More"); ?></button>
</span>
</div>
</div>
</div>
<?php $i++;
if($i != 0 && $i % 3 == 0) { ?>
</div><!--/.row-->
<div class="clearfix"></div>
<?php
} ?>
<?php
endwhile;
}
wp_reset_query();
?>
</div><!--/.container-->