Skip to content
An extension for Advanced Custom Fields; to let you use the GoogleMaps Autocomplete without having to load in the full map component.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets/js [base] - base commit Mar 27, 2019
fields
images
.gitignore
README.md
acf-Autocomplete.php

README.md

ACF GoogleMaps Autocomplete

Adds a new field type to ACF so you can use Google Maps Autocomplete anywhere inside your admin area without displaying the full ACF map component.

Useful for long lists of locations etc.

Installation

  • Copy the folder into your wp-content/plugins folder
  • Make sure you have included the standard ACF call to your Google Map API key in your functions.php file
  • Activate ACF and this plugin
  • Create the new ACF field, selecting the new GoogleMaps Autocomplete field type, under jQuery
  • Enter, and pull the data out to the Front-End

This plugin will add 3 fields to be saved within your ACF data - address, lat, lng

It is up to you to decide how to display them on the Front-End and send the information to the map; I recommend using data attributes.

Include this in your functions.php file

function my_acf_init() {
  acf_update_setting('google_api_key', '**your_map_key_here**' );
}

add_action('acf/init', 'my_acf_init');

Screenshot

Helped you out? Buy me a coffee!

Buy Me A Coffee

You can’t perform that action at this time.