Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Query multiple meta key values in WordPress
<?php
$meta_query_args = array(
'meta_query' => array(
array(
'key' => 'city_name',
'value' => array('New York City', 'London', 'San Francisco'),
'compare' => 'IN'
)
)
);
$meta_query = new WP_Query( $meta_query_args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment