Skip to content
Adds a Location field to Advanced Custom Fields. This field allows you to find addresses and coordinates of a desired location.
JavaScript PHP
Branch: master
Clone or download
Pull request Compare This branch is 3 commits ahead, 3 commits behind julienbechade:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Advanced Custom Fields - Location Field add-on

Adds a Location field to Advanced Custom Fields. This field allows you to find addresses and coordinates of a desired location.


This is an add-on for the Advanced Custom Fields WordPress plugin and will not provide any functionality to WordPress unless Advanced Custom Fields is installed and activated.

The Location field provides:

  • a search field where you can type in some coordinates or an address and hit Enter.
  • a Google map which you can click at the desired location.

In both cases, Google will find the location and return the coordinates and the complete address, if you want it complete. A marker will be added at the desired location.

Download on

Source Repository on GitHub

Bugs, Questions or Suggestions


Make sure you read the Advanced Custom Fields's documentation first.


The Location field comes with 3 options:

  1. The map address let you choose the value(s) to return on the front-end:
    • Coordinates and address (default)
    • Coordinates only
  2. The map center let you set the coordinates used to center the initial blank map.
  3. The map zoom.


Retrieving the value(s) on the front-end differs according to the Map address options.

  • Coordinates and address (default)
	$location = get_field('location');
	echo $location['address'];
	echo $location['coordinates'];
  • Coordinates only
<?php the_field('location'); ?>


The Location Field plugin can be used as a WordPress plugin or included in other plugins or themes. There is no need to call the Advanced Custom Fields register_field() method for this field.

  • WordPress plugin
    1. Download the plugin and extract it to /wp-content/plugins/ directory.
    2. Activate the plugin through the Plugins menu in WordPress.
  • Added to Theme or Plugin
    1. Download the plugin and extract it to your theme or plugin directory.
    2. Include the location-field.php file in you theme's functions.php or plugin file.
      include_once( rtrim( dirname( __FILE__ ), '/' ) . '/acf-location-field/location-field.php' );

Frequently Asked Questions

I've activated the plugin, but nothing happens!

Make sure you have Advanced Custom Fields installed and activated. This is not a standalone plugin for WordPress, it only adds additional functionality to Advanced Custom Fields.



  • Initial release
You can’t perform that action at this time.