How to wrap every 3 posts in a div (and close the last div too) [closed]
This is purely PHP which is considered to be Off-topic but this is my take: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); $i = $wp_query->current_post; echo ( 0 == $i % 3 ) ? ‘<div class=”row”>’ : ”; ?> <div class=”project”> </div> <!– /.project –> <?php echo ( … Read more