Created
April 29, 2022 21:42
-
-
Save someguy9/8fea524745fea4dc4e7e23c635273911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_query_args = array( | |
'meta_query' => array( | |
'relation' => 'AND', | |
array( | |
array( | |
'key' => 'city_name', | |
'value' => array('New York City', 'London', 'San Francisco'), | |
'compare' => 'IN' | |
), | |
array( | |
'key' => 'featured_post', | |
'value' => true, | |
'compare' => '=' | |
) | |
) | |
) | |
); | |
$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