Nick Shaw

Add Google Map to WordPress Site

Add the following to the functions.php file

<?php
function fn_googleMaps($atts, $content = null) {

extract(shortcode_atts(array(
"width" => '640',
"height" => '480',
"src" => ''
), $atts));
return '';
}

add_shortcode("googlemap", "fn_googleMaps");
?>

Here is the shortcode that you need

[googlemap width="200" height="200" src="[url]"]

Get the url from the top right area of http://maps.google.co.uk

Exit mobile version