I have a page on which I want to display all my posts from my custom post type, which I am able to do in a single column. However, I want to display the posts in 2 columns.
For this, I will need two different html elements, one for the first column, which will display the first post, and another element for the second column, which will display the second post, third post in first column, fourth post in second column, and so on.
Therefore, I will need both of the html elements for both columns to be in the same Wordpress loop, but that means I will need to display the info of one post and then move on to display the info of the next post all in one loop.
I don't know if I can use
the_post two times in the same loop, to display the info of the first post and then use the_post a second time in the same loop to display the info of the next post. Is this possible or is there another better way to do it?
Also, I am planning to use flexbox for the two columns so that on tablet or mobile, it will be responsive and make it just one column.