Address Lookup field for ACF
Address Lookup field for ACF adds an address lookup field type to Advanced Custom Fields. Users can search for addresses directly within the editor, and the field returns structured address data including coordinates. The plugin uses Nominatim (OpenStreetMap) as the default lookup provider, and supp
Address Lookup field for ACF adds an address lookup field type to Advanced Custom Fields. Users can search for addresses directly within the editor, and the field returns structured address data including coordinates.
The plugin uses Nominatim (OpenStreetMap) as the default lookup provider, and supports registering custom providers.
The plugin also includes support for the Photon geocoding provider out of the box. You can choose between Nominatim and Photon, or register your own providers.
Features
- Live address search — AJAX-powered search as you type, using Select2.
- Structured data — Returns a normalized array with display name, coordinates (lat/lon), house number, road, city, state, postcode, and country.
- Country code filtering — Limit search results to specific countries.
- Language support — Set the preferred language for results.
- Extensible provider system — Register your own address lookup providers via the address_lookup_for_acf/register_providers action.
- REST API support — Field values are exposed in the REST API.
- Photon provider — Use the Photon geocoding service as an alternative to Nominatim.
Usage
- 01Install and activate the plugin.
- 02Create or edit an ACF field group.
- 03Add a new field and select the Address field type.
- 04Optionally configure country code filtering and language.
- 05Use get_field() or the_field() in your templates — the value is returned as an associative array.
Template example
$address = get_field('my_address_field');
The returned array has the following structure:
[ 'display_name' => 'Example Street 1, City, Country', 'coordinates' => ['lat' => '52.370216', 'lon' => '4.895168'], 'house_number' => '1', 'street' => 'Example Street', 'city' => 'City', 'state' => 'State', 'postcode' => '1234 AB', 'country' => 'Country', ]