Last active
April 26, 2016 12:48
-
-
Save IgnacioGaldames/b7aa3e234939e3b32b4e to your computer and use it in GitHub Desktop.
exclude custom taxonomy
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'=>'casas', | |
'posts_per_page'=>4, | |
'orderby'=>'date', | |
'order'=>'DESC', | |
'tax_query' => array( | |
array( | |
'taxonomy'=>'categorias_casas', | |
'field' => 'slug', | |
'terms' => array( 'agenda' ), | |
'operator' => 'NOT IN', | |
), | |
) | |
); | |
$query = new WP_Query( $args); | |
?> | |
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment