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.

Notifications You must be signed in to change notification settings

mt-deva/ACF-GoogleMaps-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An extension for Advanced Custom Fields; to let you use the GoogleMaps Autocomplete without having to load in the full map component.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published