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