Add googlemap to post or page wordpress

// add to functions.php
//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”);

// add to post/page
[googlemap width=”200″ height=”200″ src=”[url]”]

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*