Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Circle of Experts

// WP_Query arguments
$args = array(
	'post_type'              => array( 'tcode_artist' ),
	'post_status'            => array( 'publish' ),
	'order'                  => 'ASC',
	'orderby'                => 'title',
);

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

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

// Restore original Post Data
wp_reset_postdata();