Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Quilt Query

// WP_Query arguments
$args = array(
	'post_type'              => array( 'quilt_square' ),
	'post_status'            => array( 'publish' ),
	'paged'                  => '1',
	'posts_per_page'         => '24',
	'order'                  => 'DESC',
	'orderby'                => 'date',
);

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

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

// Restore original Post Data
wp_reset_postdata();