Custom Taxonomy with tax_query

From the WordPress codex for wp_query: Display posts tagged with bob, under ‘people’ custom taxonomy: $args = array( ‘post_type’ => ‘post’, ‘people’ => ‘bob’ ); $query = new WP_Query( $args ); Display posts tagged with bob, under ‘people’ custom taxonomy, using tax_query: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘people’, … Read more

Custom Post type category pages template and loop

You may alter the main query before the loop, but it’s crucial to reset the main query afterwards. Otherwise you’ll probably run into problems elsewhere. Disclaimer: Doing this is officially discouraged by WordPress here. However, in my experience it works perfectly to achieve the behaviour you want. Just don’t forget to add wp_reset_query(); after closing … Read more