Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

restaurant profile search

// WP_User_Query arguments
$args = array(
	'role'           => 'restaurant',
	'meta_query'     => array(
		array(
			'key'     => 'last_review_date',
			'value'   => 'strtotime(date("d/m/Y", strtotime($date)) . "-2 months")',
			'compare' => '<',
			'type'    => 'DATE',
		),
	),
	'fields'         => 'all',
);

// The User Query
$user_query = new WP_User_Query( $args );