How to Generate Map Locations of User or Groups in WordPress

Generate Map Locations of User or Groups with ProfileGrid

If you maintain a membership website where you can generate map locations of user or groups, you get a chance to stand out among your competitors. By displaying map locations of your site users, you get to show your online reach. It will also help your site visitors to check from where most of the users are registering to your site. The map also gives you real-time access to stats of all logged in users.

The WordPress ProfileGrid plugin helps you generate maps showing locations of all registered users on your site. In this article, I will help you generate map locations of user or groups with ProfileGrid.

Activating Geolocation On ProfileGrid

The ProfileGrid plugin offers a few extensions, some are free and some are part of the premium pack. The Geolocation extension comes with the premium pack unlike bbPress and WooCommerce Integration, User Display Name and User Profile Custom Slugs extensions. In order to generate map locations of user or groups, you need to activate the Geolocation extension from the ‘Extensions’ page.

Show Map Locations profile gris extensions

Right after activation, the extension becomes part of the ‘Global Setting’ page. Then, when you click on the ‘Geolocation’ option you land on a page called the ‘Geolocation Setting Page’.

Show Map Locations settings

From here, you can select the expanse of your map whether it should be country-specific or that of the entire world. You can choose the level till which you want to zoom your map. Also, here you get the option to retrieve your Google API Key. By clicking on ‘You can sign up for a key HERE’, you land on a page, similar to the one given below.

Show Map Locations google API

From here, you select ‘Create a Project’ if you don’t have an API key already.  Eventually, Google will provide you with an API key with which you can generate map locations of user or groups.

Show Map Locations google API key

Features of the Geolocation Extension

The extension, apart from adding a Google Map on your site, lets you choose the Group from which you want to show the locations of the users. The location of Group members in an area is aggregated based on zoom in/out for the map. Individual locations of Group members can be seen by zooming in on the map. The extension picks up location data automatically from the group registration form. By clicking on an individual Group member’s location, a popup appears displaying the member’s name, Group name and profile picture.

Placing the Map on a Page

This WordPress User Profile Plugin apart from its array of extensions offers some very useful shortcodes. In fact, it has a whole page dedicated to shortcodes. The Geolocation Map can be displayed on any page. Now, in order to display the map on the frontend, you have to use the shortcode [PM_USERS_MAP].

Show Map Locations map page shortcode

Copy it from the ProfileGrid shortcode page and generate map locations of user or groups in any page of your choice. The shortcodes work like a magic spell in this plugin. One can perform any task in just a few clicks with shortcodes. For example, one can create a WordPress user profile page with just one specific shortcode of the plugin.

We can customize the Shortcode results using parameters. Users can apply the following parameters to control shortcode results: 

1. gid – Used for showing a specific Group(s) members by passing in the group IDs (comma separated)

2. exclude_users – Used for excluding specific users by passing in the user’s IDs (comma separated)

3. relative_time – Used for showing locations of only those members that have registered during a specific time span (today, yesterday, this_week, last_week, this_month, this_year)

4. info_popup – Used for showing or hiding the information popup when a viewer clicks on a member’s location maker

Given below is an example of a shortcode with parameters. We have pasted it on a new ‘Map’ page.

Show Map Locations map page

This will ensure that the locations of all the users from groups 1,2,3 will be shown on the map with an info pop-up.

Show Map Locations on google map

In the above picture, we see the locations of all the users on the Google map with an info pop-up showing their details.

Utility and Consumer Convenience

The utility of being able to generate map locations of user or groups on your site is many. You can show the branches of your company with their area heads on these maps. You can show the far-reaching extent of your staff members who are working from various parts of the world. Also, you can check from which area you are getting users on your site. This way you open up a global platform for your users. You let the users from one part of the world to communicate with others from another far end of the world. However, all this could not have been possible without the powers of the ProfileGrid plugin. It makes it a piece of cake to create a complete membership site. One can perform business from there, convert it into an online store or enlist students or employees of an organization in it.



  1. Shean

    Hi there,
    Is it possible to create a link on the info-popup that directs you to the user’s profile page?

    1. prabs

      User name on info popup already directs you to profile page.

      To generate map locations for users and groups refer to following steps:

      1) Install and activate ProfileGrid Extension ‘Geolocation’.
      2) After activating extension, site admin will be able to add address type field in fields for group.
      3) Configure the field options (to be filled by users of that group).

      To display user location, configure the setting for geolocation from “ProfileGrid >> Geolocation Settings” and then use shortcode [PM_USERS_MAP] to show locations of all users.

Leave a Comment

Your email address will not be published. Required fields are marked *