Skip to content

Instantly share code, notes, and snippets.

@Pleiades
Created November 15, 2012 21:54
Show Gist options
  • Save Pleiades/4081576 to your computer and use it in GitHub Desktop.
Save Pleiades/4081576 to your computer and use it in GitHub Desktop.
Add Google Maps
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");
[googlemap width="600" height"360" src="http://google.com/maps/?ie=..."]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment