I am having problems with meta_query
in Wordpress. The first example works fine:
$args = array(
'post_type' => 'my_post',
'meta_query' =>
array(
array(
'key' => 'my_field',
'value' => '50',
'compare' => 'LIKE',
),
),
);
$query = new WP_Query( $args );
But what I want to do, as shown below, and in Wordpress documentation, does not work.
$args = array(
'post_type' => 'my_post',
'meta_query' =>
array(
array(
'key' => 'my_field',
'value' => array('50','60'),
'compare' => 'IN',
),
),
);
$query = new WP_Query( $args );