Skip to content

Instantly share code, notes, and snippets.

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 wpflippercode/b2a88cdfd88b7332112e2f650f86439b to your computer and use it in GitHub Desktop.
Save wpflippercode/b2a88cdfd88b7332112e2f650f86439b to your computer and use it in GitHub Desktop.
Show Single Post's Location on the Map on single post page.
<?php
$CURRENTPOST_LAT = get_post_meta(get_the_ID(),'_wpgmp_metabox_latitude',true);
$CURRENTPOST_LON = get_post_meta(get_the_ID(),'_wpgmp_metabox_longitude',true);
echo do_shortcode("[display_map marker1='$CURRENTPOST_LAT | $CURRENTPOST_LON | hello world | Bla Bla | category']");
?>
@wpflippercode
Copy link
Author

Paste above code in your single.php file template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment