I want to print a

class called ‘first’ in 1, 4, 7, 10, 13 …… position What should i need to do it ?


while (have_posts()) : the_post(); 

<div class="column dt-sc-one-third<?php if ($i==0){ ?> first <?php } ?>"> 

<p class="comments">
<a title="Comment on Latin words Ipsum" href="#">
<span class="fa fa-comment"> </span>


<?php $i++; endwhile; ?>

I want first div should have a class name called first and the 4 th div should have that class and so on…..

Read more here: How to print something in certain position in php


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: