wp_qurery_locations
// WP_Query arguments $args = array( 'post_type' => array( 'wbtm_locations_proxy' ), 'post_status' => array( 'publish' ), 'order' => 'ASC', 'orderby' => 'title', ); // The Query $departures_query = new WP_Query( $args ); // The Loop if ( $departures_query->have_posts() ) { while ( $departures_query->have_posts() ) { $departures_query->the_post(); // do something } } else { // no posts found } // Restore original Post Data wp_reset_postdata();