Varying div class in Wordpress

Hi folks i’m not sure if this is the right place to ask this as i’m unsure if it can be targeted specifically.

I’m trying to build a Wordpress Theme from scratch and i’m getting on pretty well so far, but i’ve run into a bit of an issue when trying to out put a portfolio archive with portfolio items in a specific design style.

Basically i want 4 small then 1 large portfolio item in columns … I’ll post the basic html that i want to output but i just don’t know how to target the loop to change the div classes at a certain count.

Any direction on where to start would be great … desired html below.

Thanks

<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-6 col-sm-12" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-6 col-sm-12" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>
<div class="col-md-3 col-sm-6" style="position: absolute; left: 0px; top: 0px;"> </div>

If you notice, the 3rd and 6th are different … Any direction on where to even start reading would be great !

Sponsor our Newsletter | Privacy Policy | Terms of Service