WordPress Query Multiple Taxonomies

This example is for an employee directory. We created a custom post type called “employee”. For that custom post type we created two custom taxonomies – “type” and “department”. Lets say we want to find employees in the technology department that are programmers.

$args=array(
	  'post_type' => 'employee',
	  'post_status' => 'publish',
	  'posts_per_page' => -1,
	  'caller_get_posts' => 1,
	  'order' => 'ASC',
	  'orderby' => 'title',
	  'type' => 'programmer',
	  'department'  => 'technology'
	);

query_posts( $args );

// loop it

Hopefully this helps if you are looking to query multiple custom taxonomies from custom post types in WordPress. Have questions? Let us know in the comments!


Category : Blog &wordpress

Leave a Reply

Want to work with us?

Do you need help with WordPress? Get in touch right away. We can't wait to work with you. Call us at (515) 966-4848 or email Andy.

Recent Posts

Follow Along