CM Map Locations (CMML) - Integration - CM Business/Expert Directory


Integration with CM Business/Expert Directory

Back to User Guides

Table of Contents

API Key is Required

This feature requires an API key from Google. Learn how to generate one:

CM Map Locations and Routes - Getting Started - Adding API Keys (Google Maps and OpenWeatherMap)


What is This Feature

CM Map Locations can be integrated with the CM Business Directory and CM Expert Directory plugins. 

This way, you can add a map to the listing of business or experts. 


Video Tutorial

The following video shows the integration using the Business Directory as an example.


Business and Expert Directory

1) Showing Maps With Businesses / Experts

You can display the map by using adding a shortcode.  

It has two attributes:

  • category - Specify one or more categories by their id or slug
  • categoryfilter - Set "1" to allow users to filter categories and "0" to disable it (Default is "1")

Business Directory Shortcode

[cmloc-business category="id|slug" categoryfilter="0"]

Expert Directory Shortcode

[cmloc-expert category="id|slug" categoryfilter="0"]

Latitude and Longitude are Required!

The map will only display items that have latitude and longitude in their address.

You can add them by choosing the precise point on the map. To do so, enable the option "Place the marker manually".

Alternatively, you can use services such as Get Lat Long from Address Convert Address to Coordinates to obtain coordinates.


2) ZIP Search in Directory

You can enable a ZIP search filter in both directories as well. This includes both a ZIP code filter and a Radius dropdown.

Example

Enabling ZIP Search

To enable this filter, you have to check the CM Map Locations setting. Head to  Admin Dashboard → CM Map Locations → Settings.

Click on the  Appearance tab.

Scroll down to the  ZIP code radius filter section.

  • Enable ZIP code radius filter - Adds the two search boxes: ZIP filter and Radius.
  • Country code for the ZIP code searching - The ZIP filter will work only within a single country. Note: it works only within a single country that you've set up in the settings.

Note that  geolocation does not work with Business and Expert Directories.

Still in this screen, you can also set the Radius field increments. Learn more CM Map Locations (CMML) - Searching by ZIP - CreativeMinds Products Documentation

ZIP Code Comes From Coordinates

The Zip code of the business/expert is fetched from the coordinates, and not from the Postalcode field.

The postalcode field is used as a public information you can show on the page

3) Business/Expert Pages With a Map

You can also show a Google map on each listing page.

Choose the default options in WP Admin → CM Expert/Business Directory Pro → Settings → Page → Page Defaults.

Then configure Show a Google map and Display map (where and how it should be shown).

TIP: Enabling/Disabling on Single Page

While editing a business or expert page, you can toggle the map on or off for that page alone.


Expert Directory Only

Expert Directory With a Map

You can show a Google map on the expert directory

Check  WP Admin → CM Expert Directory Pro → Settings → Expert Directory.

  • Show CM Locations Map - Shows the map or not
  • Show map on page load - Show the map by default or with a button click. Disabling might be recommended if the map takes time to load
  • Shows all experts on map - Show all experts or only the ones shown in the current page

More information about the CM Locations Manager WordPress  Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center