I have the following code:
<?php
$images = get_post_meta(get_the_ID(), 'pointb_portfolio_images', false);
$i = 0;
foreach ($images as $att) {
$i++;
$src = wp_get_attachment_image_src($att, 'full');
$src = $src[0];
echo "<img src='$src' class='t$i'/>";
}
?>
What I would like to do, is for every 9 images, place a DIV container around them. So it would be:
<div>9 images here</div>
<div>next 9 images here</div>
<div>next 9 images here</div>
I have an incremental class being applied to each image, and this would need to continue increasing upward.
I have been googling to try and find a solution for this, but I am struggling to find even the correct search query.
Would appreciate any assistance or tips so that I can accomplish what I need.
Thanks