Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Compare Meta with Date Range

Compare Meta with Date Range

$meta_query = array(
	'relation' => 'AND',
	array(
		'key'     => 'listing_start_date',
		'value'   => '1111',
		'compare' => '>=',
	),
	array(
		'key'     => 'listing_end_date',
		'value'   => '12233',
		'compare' => '<=',
	),
);