Query – Featured Pages – Secondary
// WP_Query arguments
$args = array(
'post_type' => array( 'page' ),
'post_status' => array( 'publish' ),
'posts_per_page' => '3',
'order' => 'DESC',
'orderby' => 'modified',
'tax_query' => array(
array(
'taxonomy' => 'page_categories',
),
),
);
// The Query
$featured_pages_secondary = new WP_Query( $args );
// The Loop
if ( $featured_pages_secondary->have_posts() ) {
while ( $featured_pages_secondary->have_posts() ) {
$featured_pages_secondary->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();