Divide WP_Query posts by date & post type
I have a WP_Query that divides 2 Posts types by date but the functionality is not there. Currently it outputs the dates and posts on the same level like..
-Date
-Post
-Post
-Date
-Post
-Post
What I would like is to wrap each date and its associated posts inside a div, as well as split the two post types for each date into two columns.
Update
I managed to split the posts up by date and wrap them in separate divs, now I just need to figure out how to divide the two CPTs into separate columns under each date
Updated Query
?php
$day_check = '';
$index = new WP_Query( array(
'orderby'='post_date',
'post_type' = array('cpt1', 'cpt2'),
'posts_per_page' =12));
while ( $index-have_posts() ) : $index-the_post();
$day = get_the_date('j');
if ($day != $day_check) {
if ($day_check != '') {
echo '/div/div'; // close the divs
}
echo 'div class="day"div class="date"' . get_the_date() . '/divdiv class="posts"';
}?
li class="post"?php the_title(); ?/li
?php $day_check = $day; endwhile; ?
?php if ( $index-have_posts() ) :?
?php endif; ?