Case Highlights
// WP_Query arguments
$args = array(
'post_type' => array( 'cases' ),
'post_status' => array( 'publish' ),
'nopaging' => true,
'posts_per_page' => '-1',
'posts_per_archive_page' => '-1',
'ignore_sticky_posts' => true,
'order' => 'DESC',
'orderby' => 'menu_order',
);
// The Query
$case_highlights = new WP_Query( $args );
// The Loop
if ( $case_highlights->have_posts() ) {
while ( $case_highlights->have_posts() ) {
$case_highlights->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();