I have a database of locations that includes the street address as well as latitude and longitude. I want to display a map based on the lat/long on each location's page. This is what I have, which I know doesn't work:
How can I get the shortcodes to output their HTML so that they can be used in an instance like this?
I've tried a couple variations of code, which I have pieced together from different threads, but none of the answers fit my exact request. Ex:
<?php
$shortcode = do_shortcode('[ASL_STORE field="long"]');
$content = '. $longitude .';
return $content;
?>
<?php
$shortcode = do_shortcode('[ASL_STORE field="lat"]');
$content = '. $latitude .';
return $content;
?>
<iframe width="300" height="220" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.com/maps/embed/v1/streetview?key=myapikey&location='$latitude',$'longitude'&heading=210&pitch=10&fov=35" >
</iframe>