Home › Forums › MapPress Support › Template tag › Reply To: Template tag
October 1, 2012 at 8:46 am
#10512
Keymaster
Hi,
Here’s how you can get a list of maps for the post, then use the first map in the list:
$maps = Mappress_Map::get_post_map_list($post->ID);
if (!empty($maps)) { $mapid = $maps[0]->mapid; do_shortcode('[mappress mapid="$mapid"]'); }