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:
- Post 1
- Post 2
27 Oct 16:
- 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);
while ($my_query->have_posts()) : $my_query->the_post();
$dates = rwmb_meta( 'pb_match_date','', $post->ID);
foreach ( $dates as $date ) {
//Is it correct? If not then what is the way?
}
endwhile;
wp_reset_postdata(); ?>
rwmb_meta
do?pb_match_date
field?rwmb_meta()
is not the same. And in case you want to keep this open and on topic: Go with plain meta handling instead of Rilwis Metabox plugin.