Return to Snippet

Revision: 36036
at November 17, 2010 01:48 by rc2789


Initial Code
<!-- Put in functions.php file -->

//Google Maps Shortcode
function fn_googleMaps($atts, $content = null) {
   extract(shortcode_atts(array(
      "width" => '640',
      "height" => '480',
      "src" => ''
   ), $atts));
   return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'"></iframe>';
}
add_shortcode("googlemap", "fn_googleMaps");


<!-- Usage inside Post/Page: -->
[googlemap width="200" height="200" src="[url]"]

Initial URL

                                

Initial Description

                                

Initial Title
Wordpress Google Map Shortcode

Initial Tags
textmate, google

Initial Language
Other