Today Tutorial is How To inserting Google Maps into WordPress Posts/Pages without Plugin, we only need to write Google Maps shortcode and we can put our own maps with really easy ways. The first time is write down this code below in your theme functions.php and we need to put the shortcode in our post/page with some parameters.
Code To Inserting Google Maps using shortcode
//Google Maps Shortcode
function do_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.'&output=embed" ></iframe>';
}
add_shortcode("googlemap", "do_googleMaps");
You can change the width and height what ever you want. Just replace on the code above. Now it’s time to practice, to use this shortcode is easy, just write down
[googlemap width="200" height="200" src="[you_url]"]
You can Replace [you_url] with you Google Maps Link, check this screen shot for more details
There are another method by using Inline Google Maps WordPress Plugin, if you need some tutorial about Google Maps Plugin version you can tried using this tutorial, thanks for DigWP to share this tricks.
Right now, many user using Google Maps to added more unique content to their visitor, such as added real address with Maps and many more.




Pingback: How To inserting Google Maps into WordPress / Quote Of The Day
There is not need to do it this way. YOu can add Google maps very easily with Google Chrome’s extension Zemanta. It shows right next to any post you are edinting. All you do is type the address inside any article post, and automatically a map shows up on the right column (zemanta). You click on it and done!!
I only do coding for things that are worth spending time with.
I recently added a Google map for a Tampa, fl. location. On this clien’s blog (no coding). http://scolibracing.com/
George.
Web developer/Digital Marketer specialist.
Pingback: » How To inserting Google Maps into WordPress – The Easy way.
Pingback: wp-popular.com » Blog Archive » How To inserting Google Maps into WordPress # WordPress Tricks & Tips
Thanks for the post.
I followed your instructions and had no problem getting the maps to display. The only thing is in your example you give a different width and height in the short code. I changed those numbers to match the map width and height I used in the functions PHP file. I also had to remove two brackets in the shortcode surrounding the url.
Using functions.php like this beats using a plugin any day.
Thanks again,
Emilio
Pingback: Razee » Blog Archive » How to Add a map to a WordPress post or page
Thanks! Neat solution to common problem, I’ll be adding maps to loads of pots now!!
Pingback: 20 Plugin Replacing Tutorials, Tips, Snippets and Solutions for WordPress | FlexLib
Pingback: 20 Plugin Replacing Tutorials, Tips, Snippets and Solutions for WordPress « Free UK Web Design
Pingback: 20 Plugin Replacing Tutorials, Tips, Snippets and Solutions for WordPress | Typography Blog
Pingback: 20 Plugin Replacing Tutorials, Tips, Snippets and Solutions for WordPress | Speckyboy Design Magazine
hi.. nice plugin.. thanks.. i use it on my site,, and look wonderfull, thanks..
Pingback: 20 WordPress Theme Hacks to replace the need for Plugins | JC
Pingback: The Creative Solution to Insert Google Analytics on WordPress | WordPress News Wire
Thanks for sharing
Is there a way to have an embed Bing map of bing using the bird’s eye view but zoomed out? The default zoom is too close and can’t really show the whole neighborhood.
Pingback: 10 полезных уроков для wordpress
Pingback: 20 Plugin Replacing Tutorials, Tips, Snippets and Solutions for WordPress « DownGraf – Design weblog for designers
Thanks for showing me this! I had a shortcode like this on my old blog at wordpress.com and i couldn’t figure out how to do it on my new blog until i read this.
By the way you can do this without the quotes around the numbers for width and height: i.e. width=200. The url is TEXT and does require quotes.
Pingback: 15 Hacks to Pimp Your WordPress Website | Template Monster Blog
Pingback: 15 Hacks to Pimp Your WordPress Website « CSS Tips
Pingback: 15 Fresh and Useful Wordpress Hacks/Snippets | gonzoblog.nl