We need to use wordpress date_query for this query. Example:-

$the_query = new WP_Query(array(
	'post_type' => 'estate_property',
	'post_status' => 'publish',
	'posts_per_page' => 10,
	'order' => 'ASC',
	'date_query' => array(
	    array(
	        // 'after'     => 'June 22nd, 2017',
	        // 'before'    => 'December 31st, 2015',
	        'after'    => array(
				'year'  => 2017,
				'month' => 6,
				'day'   => 21,
			),
			'inclusive' => true,
	        
	    ),

	),
));

You can check wordpress documentation for better understanding.

Advertisements