Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active January 2, 2016 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save billerickson/8290000 to your computer and use it in GitHub Desktop.
Save billerickson/8290000 to your computer and use it in GitHub Desktop.
<?php
$location = get_post_meta( get_the_ID(), 'be_address', true );
echo '<p><a href="https://www.google.com/maps/place/' . urlencode( $location['address'] ) . '"><img src="http://maps.googleapis.com/maps/api/staticmap?center=' . urlencode( $location['lat'] . ',' . $location['lng'] ). '&zoom=13&size=167x171&maptype=roadmap&sensor=false&markers=color:red%7C' . $location['lat'] . ',' . $location['lng'] . '" /></a></p>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment