Blog - Latest News

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

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *