Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

survey query

// WP_Query arguments
$args = array(
	'post_type'              => array( 'survey' ),
	'post_status'            => array( 'publish' ),
	'posts_per_page'         => '-1',
	'meta_query'             => array(
		'relation' => 'AND',
		array(
			'key'     => 'nanotek_field_language_survey',
			'value'   => '$myLang',
			'compare' => '=',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();