I need to display:
first three posts in first div from wordpress,
second three posts in second div from wordpress and
third three posts in third div from wordpress.
How can I do this?
div 1
--1st post
--2nd tpost
--3rd post
div 2
--4th post
--5th post
--6th post
div 3
--7th post
--8th post
--9th post
You could do it via several methods. Put the data into an array and then
chunk()
it, and loop over those chunks.Or, you could simply loop over the data:
Hope the code will work for you.