Skip to content

Instantly share code, notes, and snippets.

@bmoredrew
Forked from mattradford/acf_get_directions.php
Created August 9, 2016 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmoredrew/dccf0b7afda3abcc562cbb164b010163 to your computer and use it in GitHub Desktop.
Save bmoredrew/dccf0b7afda3abcc562cbb164b010163 to your computer and use it in GitHub Desktop.
ACF Get Directions map link
<a class="directions" href="https://www.google.com/maps?saddr=My+Location&daddr=<?php $location = get_field('map_location'); echo $location['lat'] . ',' . $location['lng']; ?>"><?php _e('Get Directions','roots'); ?></a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment