I am developing code with wordpress. Because of lacking abilities I am having some trouble.
construction of this questioning part in my wordpress
custom-post-type
:book
// this is my custom-post-type.meta_key
:date_all
// this is my meta_key of 'book'.meta_value
:array('year' => '2012', 'month =>'3', 'date' => '23', 'dw' => '2')
and thers are some book-posts (my custom post type). I am trying to query book-post which is corresponding conditions below:
meta_key
:date_all
meta_value
:year = 2018
&month = 3
compare
:>=
or 'after'
I am making some code. but I don't know how to express the 'meta_value'. Because this is array value.
$args = array(
'post_type' => 'book',
'posts_per_page' => -1,
'meta_key' => 'date_all',
'meta_value' => ????????,
'compare' => '>=',
);
$query = new WP_Query($args);
while($query->have_posts() ) : $query->the_post();
the_title(); ?>
endwhile; wp_reset_query();
Can you give some help?