Query multiple custom post types in single loop

Just change the post_type bit to:

'post_type' => array('testimonial', 'other_post_type', 'another-post-type'),

Assuming that taxonomy is valid across all 3 post types. Otherwise you’ll have to leave that out.

Why? You can pass an array to post_type field.

Leave a Comment