Skip to content

Instantly share code, notes, and snippets.

@streetcoder
Created March 21, 2016 15:56
Show Gist options
  • Save streetcoder/b6cf9e4a4102a8003785 to your computer and use it in GitHub Desktop.
Save streetcoder/b6cf9e4a4102a8003785 to your computer and use it in GitHub Desktop.
$pcount = 0;
$wrap_div = '<div class="tri-wrap-post">';
/* Start the Loop */
echo $wrap_div;
while ( have_posts() ) : the_post(); $pcount ++;
get_template_part( 'template-parts/content', get_post_format() );
if ( $pcount % 3 == 0 ) {
echo '</div>' . $wrap_div;
}
endwhile;
echo '</div>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment