Home Forums ACF PRO Google maps search Reply To: Google maps search

  • Hi @twizzlebird

    You can always query the posts based on custom fields. This page should give you more idea about it:

    You can use the $_GET variable for the search keyword and use it like this:

    $posts = get_posts(array(
    	'numberposts'	=> -1,
    	'post_type'	=> 'cpt',
    	'meta_query'	=> array(
    		'relation'		=> 'AND',
    			'key'	 	=> 'google_map',
    			'value'	  	=> $_GET['location'],
    			'compare' 	=> 'LIKE',

    The URL should be something like this:

    I hope this helps 🙂