First time using wordpress query so not sure how to handle this problem. I want to get post titles where meta_key is 'tag' and meta_values are 'A, B, C'. Something similar to IN() function of sql query. How should I do to achieve that?
This is my code so far but it is not working as it ignores condition.
//$tags consists of my meta_value ( A, B, and C)
foreach ($tags as $input) {
$data[] = array( 'meta_key' => 'tag', 'meta_value' => $input, 'orderby' => 'post_date' );
}
$query = new WP_Query( $data );
Thanks in advance for your kind help.