Projects // Query
// WP_Query arguments
$args = array(
'post_type' => array( 'project' ),
'post_status' => array( 'publish' ),
'nopaging' => true,
'order' => 'ASC',
'orderby' => 'menu_order',
'tax_query' => array(
array(
'taxonomy' => 'project_category',
'operator' => 'EXISTS',
),
),
);
// The Query
$projects__query = new WP_Query( $args );
// The Loop
if ( $projects__query->have_posts() ) {
while ( $projects__query->have_posts() ) {
$projects__query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();