Skip to content

Instantly share code, notes, and snippets.

@kadavre
Last active December 28, 2015 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadavre/7411363 to your computer and use it in GitHub Desktop.
Save kadavre/7411363 to your computer and use it in GitHub Desktop.
Once you copy and paste the above code to your function.php, you will need to copy the short code below into the exact place where you want Google Maps to be displayed. [googlemap width="200" height="200" src="[url]"]
//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>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment