Tag Archive for: custom post

get_posts() with Taxonomy

$args = array( ‘post_type’ => ‘POST_TYPE’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘TAXONOMY_NAME’, ‘field’ => ‘slug’, ‘terms’ => array( ‘YOUR_TERMS’ ), ‘operator’ => ‘AND’ ) ) ); get_posts( $args ); for more information refer the link http://codex.wordpress.org/Function_Reference/WP_Query#Taxonomy_Parameters