I'm using this PHP snippet to wrap every 12 Wordpress posts in a div.
<?php
$i = 1;
echo '<div class="row content-block">';
if ( $project->have_posts() ) :
while ( $project->have_posts() ) : $project->the_post();
get_template_part('project', 'content');
if($i % 12 == 0) {echo '</div><div class="row content-block">';}
$i++; endwhile; endif;
echo '</div>';
?>
Is there any way that I can apply unique ID's to the row content-block
divs? for example block-1
, block-2
, etc/