Posted By

rc2789 on 11/17/10


Tagged

textmate google map worpdress


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

baczoni
meshwerk


Wordpress Google Map Shortcode


 / Published in: Other
 

  1. <!-- Put in functions.php file -->
  2.  
  3. //Google Maps Shortcode
  4. function fn_googleMaps($atts, $content = null) {
  5. extract(shortcode_atts(array(
  6. "width" => '640',
  7. "height" => '480',
  8. "src" => ''
  9. ), $atts));
  10. return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'"></iframe>';
  11. }
  12. add_shortcode("googlemap", "fn_googleMaps");
  13.  
  14.  
  15. <!-- Usage inside Post/Page: -->
  16. [googlemap width="200" height="200" src="[url]"]

Report this snippet  

You need to login to post a comment.