Enter your keyword

Blog

How to create Google Maps Shortcode

//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.'&amp;output=embed"></iframe>';
}
add_shortcode("googlemap", "fn_googleMaps");
[googlemap width="200" height="200" src="[url]"]

No Comments

Add your review

Your email address will not be published.

* Feilds are Required.