'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args); foreach ($attachments AS $attachment) { $imgid = $attachment->ID; $imgmeta = wp_get_attachment_metadata( $imgid ); $latitude = $imgmeta['image_meta']['latitude']; $longitude = $imgmeta['image_meta']['longitude']; $lat_ref = $imgmeta['image_meta']['latitude_ref']; $lng_ref = $imgmeta['image_meta']['longitude_ref']; $lat = geo_single_fracs2dec($latitude); $lng = geo_single_fracs2dec($longitude); if ($lat_ref == 'S') { $neg_lat = '-'; } else { $neg_lat = ''; } if ($lng_ref == 'W') { $neg_lng = '-'; } else { $neg_lng = ''; } echo ""; } } } // Call the EXIF data in your theme with