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.

      1. Shean

        “User name on info popup already directs you to profile page”
        Thanks, wasn’t sure if the name was a link.

        Some users may not want to appear on the map. Is it possible for them to ‘hide’ this in privacy settings?

        Thank you

  2. Sarah Bishop

    I’m having trouble, I have created an address field in my user profile that includes town and country and I have enabled the map on a page using an API key with no group restrictions. None of the user profiles are showing up on the map (I’m using an iPad at the moment, I’m hoping it’s not restricted)

    Also I can’t get the map to focus over the UK I’ve tried United Kingdom, England and London but it says focused over Turkey

    Can you help?

    1. ProfileGrid | Prabs

      Could you please confirm steps you have followed to generate the Google API key. According to Google’s new policy, you have to pay for using Map API, which otherwise does not have any restriction from ProfileGrid’s side.

      Regarding map focus issue, could you please confirm which version of extension you are using.

      Also for more details on map extension, you can visit the link:

  3. Sarah

    Hi, what do you do if you have 2 profiles in the same location? You can only see the number and can’t see the profile information.

    1. ProfileGrid | Prabs

      Map cluster depends on map zoom factor- to cover more area on the map, zoom should be lesser. If you zoom in the map, individual pins on the map will not cluster. Also, if you click on that cluster no., map will zoom in automatically and you will be able to see the individual pins on the map. You can change the zoom level from map settings in ProfileGrid.

      Google map is coordinate based. That means in order to display users separately by clicking on a cluster, details about zip code, the address have to be added.

  4. Rich Voyek

    Can map users, but include to user information? We would like a make of our users, but the spots remain anonymous.

    1. ProfileGrid | Prabs

      ProfileGrid extension “Geolocation” generate maps displaying locations of all the users or specific groups via simple shortcodes. ProfileGrid gets access to location data from registration form itself.

      On map you can enable user info popup and link its redirect to the user profile page.

      1. Rich

        Do I create a group? What fields do I need to add to the group to get it to map the members of the group?

        1. ProfileGrid | Prabs

          To show members on map, you need to add “Address” field in group fields. Once you enable the plugin “GeoLocation” , you’ ll see this field in custom fields list. In address field settings you will see other options to enable like Address Line 1, city, country etc..

          Please follow the steps below to add a field to the group:

          1) Login to the WordPress dashboard and go to the ProfileGrid menu
          2) Here you will see the Groups list
          3) Then go to the group Fields for a group
          4) Next you will see the list of fields for that group. You can edit, delete or add fields from here.

Leave a Comment

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