Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

estate_property

estate_property

// WP_Query arguments
$args = array(
	'post_type'              => array( 'estate_agent', 'estate_property' ),
	'post_status'            => array( 'publish' ),
	's'                      => 's',
	'nopaging'               => false,
	'posts_per_page'         => '10',
	'order'                  => 'ASC',
	'orderby'                => 'title',
	'meta_query'             => array(
		'relation' => 'OR',
		array(
			'key'     => 'property_address',
			'value'   => 's',
			'compare' => 'LIKE',
			'type'    => 'CHAR',
		),
		array(
			'key'     => 'property_zip',
			'value'   => 's',
			'compare' => 'LIKE',
			'type'    => 'CHAR',
		),
		array(
			'key'     => 'mls',
			'value'   => 's',
			'compare' => 'LIKE',
			'type'    => 'CHAR',
		),
	),
);

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

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

// Restore original Post Data
wp_reset_postdata();