Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

wpquery customfield

// WP_Query arguments
$args = array(
	'post_type'              => array( 'page' ),
	'post_status'            => array( 'Publish' ),
	'meta_query'             => array(
		'relation' => 'AND',
		array(
			'key'     => 'gemeente_gekoppeld',
			'value'   => 'Voorst',
			'compare' => 'LIKE',
		),
	),
);

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