Created
July 15, 2016 20:26
-
-
Save enlacee/1f4aab7341789263d9887f54f52cea16 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 | |
$args = array( | |
'post_type' => 'post', | |
'tax_query' => array( | |
'relation' => 'AND', | |
array( | |
'taxonomy' => 'post_tag', | |
'field' => 'slug', | |
'terms' => 'tag-1' | |
), | |
array( | |
'taxonomy' => 'post_tag', | |
'field' => 'slug', | |
'terms' => array( 'tag-2', 'tag-3', 'tag-4' ) | |
) | |
); | |
$query = new WP_Query( $args ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment