I want to make a list of sequence items only with 3 columns, I created an odd or even parser, to do the listing side by side, in the case 2 columns ...
But now I have to do a listing of 3 items per line ... The image below shows what the idea is, but only column 3 is repeating the items in column 2.
<divclass="row p30-top">
<div class="col-md-12">
<?php
if(have_posts()) : the_post();
$i = 0;
$content = explode("<li>", get_the_content());
foreach($content as $row) :
if($i % 2 == 0) :
?>
<div class="row">
<div class="col-md-4"><?= $row ?></div>
<?php else : ?>
<div class="col-md-4"><?= $row ?></div>
<div class="col-md-4"><?= $row ?></div>
</div>
<?php
endif;
$i++;
endforeach;
if($i % 2 != 0) { echo '</div>'; }
endif;
?>
</div>
</div>
Exemplo de como estou implementando o código:. (Acima)