alerts query
// WP_Query arguments $args = array( 'post_type' => array( 'alerts' ), 'orderby' => 'modified', ); // The Query $country_alerts = new WP_Query( $args ); // The Loop if ( $country_alerts->have_posts() ) { while ( $country_alerts->have_posts() ) { $country_alerts->the_post(); // do something } } else { // no posts found } // Restore original Post Data wp_reset_postdata();