Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

auc

auc query

// WP_Query arguments
$args = array (
	'post_type'              => array( 'listings' ),
	'post_status'            => array( 'published' ),
	'meta_query'             => array(
		array(
			'key'       => 'auction_end_date',
			'value'     => '$curr_time',
			'compare'   => '>=',
			'type'      => 'UNSIGNED',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();