Posted By

maryann on 01/30/10


Tagged

google wordpress maps


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

BrianCoyDesign


Google Maps Shortcode


 / Published in: PHP
 

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

  1. // function
  2. function fn_googleMaps($atts, $content = null) {
  3. extract(shortcode_atts(array(
  4. "width" => '640',
  5. "height" => '480',
  6. "src" => ''
  7. ), $atts));
  8. return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'"></iframe>';
  9. }
  10. add_shortcode("googlemap", "fn_googleMaps");

Report this snippet  

You need to login to post a comment.