Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save wpflippercode/b2a88cdfd88b7332112e2f650f86439b to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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