Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Retired Employee

Retired Employee Query Loop

// WP_Query arguments
$args = array (
	'post_name'              => 'employee',
	'page_name'              => 'employee',
	'post_type'              => 'employee',
	'post_status'            => 'retired',
	'pagination'             => true,
	'posts_per_page'         => '10',
	'posts_per_archive_page' => '10',
	'order'                  => 'ASC',
	'orderby'                => 'title',
);

// The Query
$retired_query = new WP_Query( $args );

// The Loop
if ( $retired_query->have_posts() ) {
	while ( $retired_query->have_posts() ) {
		$retired_query->the_post();
		// do something
	}
} else {
	// no posts found
}

// Restore original Post Data
wp_reset_postdata();