Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How To Insert Google Maps Into WordPress?

Google Maps will let us to find any location in the world using the web. If you are having a WordPress website and looking for a way to add Google Maps in your website, you are in the right page. Here, I have given a tutorial for inserting Google maps in WordPress website.

There are different ways to Insert Google Maps into a WordPress website or blog. Let’s have a look at them.

Method 1: Use Code to Insert Google Maps Into WordPress

//Google Maps Shortcode

function do_googleMaps($atts, $content = null) {
extract(shortcode_atts(array(
"width" => '640',
"height" => '480',
"src" => ''
), $atts));
return '';
}
add_shortcode("googlemap", "do_googleMaps");

Note: You can change width and height of the Google maps as per your requirement. To do that, you have to change the iframe code in the above coding.

Method 2: Manually Adding Google Maps in WordPress

Using this method, you can add the exact location of your business in WordPress website or blog.

Step 1: First, go to Google maps.

Step 2: Type your business address in the search box. Once you have found the location, click share link option (which appears on the right-hand side panel).

Step 3: Now, you will find embed map option. Click that. For reference see the screenshot given below.

Step 4: Copy the iframe code and paste it into your WordPress Page or post.

Related Article: How To Add Favicon In WordPress

Method 3: Using Plugin to Add Google Maps in WordPress

Method 2 is simple and it is recommended, if you want to embed Google Maps just once in your WordPress website. But if you need to add Google maps frequently on several posts then you can go with this plugin method.

Step 1: To get started, go to Plugins→Add New and search for “MapPress Easy Google Maps“. Once you find the plugin, install and activate it.

Step 2: Now, you have to generate API key for Google Maps. You can Generate it from here. Once you have generated it, enter the Browser API key under Basic Settings of MapPress Easy Google Maps plugin.

Step 3: Next, visit Google Maps and enter your business address. Once you have found your location, copy the URL and enter it into Directions server under Localization settings.

Step 4: That’s it. Click save changes.

Now your map will appear in every page of your WordPress blog.

These are three different methods to insert Google maps in your WordPress website. If you encounter any issues while following any of these methods, do let me know via comments.

The post How To Insert Google Maps Into WordPress? appeared first on Crack Aloud.



This post first appeared on Crack Aloud - Useful Tips, Tricks And Tutorials, please read the originial post: here

Share the post

How To Insert Google Maps Into WordPress?

×

Subscribe to Crack Aloud - Useful Tips, Tricks And Tutorials

Get updates delivered right to your inbox!

Thank you for your subscription

×