So, I have found bunch of topics about wrapping every nth-item in div, but there is not topic about wrapping first five items in one separate wrapper and all other remaining rows into another wrapper. How to achieve that?
You can use an if statement as follows:
$i = 0;
// output your normal data between here
No, sorry, this only wraps every item in div. I need it to count out first 5 rows, wrap them in div and count out another remaining rows and wrap them in another div.
Oops my bad, I was counting every element up to 5
This works using the following code: