I need someone to answer this question. I have metabox which shows date:
$date = rwmb_meta( 'pb_match_date', '', $post->ID );
I want to get all the associated posts with specific date of that metabox as follows.
:
23 Oct 16:
1)Post 1
2)Post 2
- Post 1
- Post 2
27 Oct 16:
1)Post 1
2)Post 2
3)Post3
What
- Post 1
- Post 2
- Post 3
What will be the query?
$args = array(
'post_type' => array( 'post' ),
);
$my_query = null;
$my_query = new WP_Query($args); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post();
$dates $dates = rwmb_meta( 'pb_match_date','', $post->ID);
foreach ($$dates $dates as $date ) {
//Is it corectcorrect? If not then what is the way?
}
?>
<?php endwhile; ?>
<?php }
endwhile;
wp_reset_postdata(); ?>