Skip to content

Instantly share code, notes, and snippets.

View ErikRobles's full-sized avatar

ErikJRobles ErikRobles

View GitHub Profile
@jaclyntan
jaclyntan / wp-autobsrows
Created February 1, 2017 03:11
Automatic bootstrap rows in the WordPress loop
<?php
$counter = 0;
while ( have_posts() ) : the_post();
$counter++;
if ($counter === 1) {
echo '<div class="row">';//start the row
}
echo '<div class="col-sm-__NAME__">';//start the col//
get_template_part( 'template-parts/content', 'page' );