Answer the question
In order to leave comments, you need to log in
How to write a formula in php?
I need to display blocks of code in a WordPress loop.
There are two blocks in one row.
It looks like this:
<div class="wrap">
<div class="block"></div>
<div class="block"></div>
</div>
<?php if ( $i === 1 || $i % 3 === 0 ): ?>
<div class="wrap">
<?php endif ?>
<div class="block"></div>
<div class="block"></div>
<?php if ( $i === 2 || $i % 2 === 0 ): ?>
</div>
<?php endif ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question