Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

DiscountMeta

$meta_query = array(
	'relation' => 'AND',
	array(
		'key'     => 'discount_listing_id',
		'value'   => '1568,1679,1851',
		'compare' => 'IN',
	),
	array(
		'key'     => 'discount_start',
		'value'   => '$timenow',
		'compare' => '>=',
	),
	array(
		'key'     => 'discount_end',
		'value'   => '$timenow',
		'compare' => '<=',
	),
);