Introduction

Map Near Me is a plugin developed by Blessed Logic that allows you to insert a button on your WordPress website that will open a Google Map listing all the locations of a search word that you specify. For example, let’s say that you’re developing a travel website and want to list all the McDonald’s in a specific location, you could do that! Here’s what the button would look like, click on it and you’ll see all the McDonald’s in Oak Brook, IL!


Usage

The Map Near Me plugin accepts the following shortcode attributes:

Single Argument (Required)

At a minimum, there must be at least one argument. If you enter an argument without a name-value pair, then that argument will be the search word to be passed to Google. If there are multiple search words, then the words need to be enclosed in quotes. By default the zip code input field will always be shown followed by the link (as a button).

Examples:

[map_near_me barber]
[map_near_me "car dealers"]

Keyword (Required):

If you decide to use a name-value pair instead of a single argument, or you need to add any optional arguments, then you must use the keyword argument followed by the search word to be passed to Google.

Examples:

[map_near_me keyword="parks"]

Zipcode (Optional)

By default, a zip code input field will appear next to the submit button which will allow the user to restrict the keyword to a specific zip code. If desired, you may disable the zip code input field. If no zip code is supplied, or if the zip code field is disabled, then Google will attempt to search near the user’s location with the keyword search word. Assigning a “1” will enable the zip input field and assigning a “0” will disable it.

Examples:

[map_near_me keyword="post office" zipcode=1]
[map_near_me keyword="post office" zipcode=0]

Label (Optional)

By default, the button label will always be “Find [keyword] Near Me”. If desired, you may override the label by using the label attribute.

[map_near_me keyword="library" label="Where is the library?"]

Advanced Topics

If you want to restrict your search to a specific zip code or even a city, you can include that in your keyword. Everything in your keyword gets passed over to Google as the search term. For example, if you wanted to show all McDonald’s restaurants in Oak Brook, IL, you would use the following shortcode:

[map_near_me keyword="mcdonald's 60523" zipcode=0 label="Find McDonald's in Oak Brook, IL"]


Another example, find all Starbucks in Clearwater, Florida (which has multiple zip codes), you would use this shortcode:

[map_near_me keyword="starbucks clearwater florida" zipcode=0 label="Show me Starbucks in Clearwater!"]

Download

To use this plugin, simply download the following zip file and upload via the Upload Plugin button from your WordPress plugin’s Add New page.

Have a question or found a bug? Contact me!

If you found this plugin useful, consider making a donation as a show of your appreciation!