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.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.