ppl query
// WP_Query arguments
$args = array(
'post_type' => array( 'cu-people' ),
'post_status' => array( 'publish' ),
'has_password' => false,
'nopaging' => true,
'posts_per_page' => '-1',
'order' => 'ASC',
'orderby' => 'title',
'tax_query' => array(
array(
'taxonomy' => 'category',
'terms' => array( '1', ' 2' ),
'field' => 'term_id',
'include_children' => false,
),
),
);
// The Query
$people_type_query = new WP_Query( $args );
// The Loop
if ( $people_type_query->have_posts() ) {
while ( $people_type_query->have_posts() ) {
$people_type_query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();