Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Basic Article (Custom Post) Query

// WP_Query arguments
$args = array(
	'post_type'              => array( 'Articles' ),
	'post_status'            => array( 'publish' ),
	'order'                  => 'ASC',
	'orderby'                => 'title',
	'meta_query'             => array(
		'relation' => 'AND',
		array(
			'key'     => 'websites',
			'compare' => 'IN',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();