Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

weslebsack on "Looping through post meta data and outputting to PHP variable"

$
0
0

Hi Everyone,
I'm currently using the do_shortcode function to place a map from the Comprehensive Google Map Plugin in my page template, with PHP variables echoing out the address, zip code and name from custom meta in the post, which works great, but only outputs one pin:

<?php echo do_shortcode('[google-map-v3 width="868" height="490" zoom="12" maptype="roadmap" mapalign="center" directionhint="false" language="default" poweredby="false" maptypecontrol="true" pancontrol="true" zoomcontrol="true" scalecontrol="true" streetviewcontrol="true" scrollwheelcontrol="false" draggable="true" tiltfourtyfive="false" addmarkermashupbubble="false" addmarkermashupbubble="false" addmarkerlist="'.$the_address.' '.$the_city.', '.$the_state.' '.$the_zip.'#http://www.apple.com#{}4-default.png{}'.$place_title.'" bubbleautopan="true" showbike="false" showtraffic="false" showpanoramio="false"]'); ?>

I'd like to be able to loop through all my posts and output their location meta data into a single variable that I can echo out in the above shortcode.

Can anyone please help?

Thanks!


Viewing all articles
Browse latest Browse all 8245

Trending Articles