Support

Account

Home Forums General Issues Query posts by custom field 'Google Map' Reply To: Query posts by custom field 'Google Map'

  • The ACF google map field stores a serialized array of values. It is impossible to search these values in the manner you describe.

    In order to do a search on longitude and latitude you would need to create an acf/save_post filter. In this filter you get the value of the ACF google map field without formatting.

    
    $value = get_field('map-field-name', $post_id, false)
    

    You would then save these values into WP custom meta using update_post_mata(). You can then uses these fields for your search.