Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Unlimited Projects

// WP_Query arguments
$args = array (
	'post_type'              => 'project',
	'post_status'            => 'Published',
	'posts_per_page'         => '-1',
);

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

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

// Restore original Post Data
wp_reset_postdata();