Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Simple Query

// WP_Query arguments
$args = array(
	'post_type'              => array( 'employer' ),
	'post_status'            => array( 'publish' ),
	'posts_per_page'         => '5',
	'orderby'                => 'rand',
);

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

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

// Restore original Post Data
wp_reset_postdata();