WordPress Interactive Map Plugin (CMML) - Integration - Business Directory Plugin


Integration with Business Directory Plugin

Back to User Guides

Table of Contents

API Key is Required

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

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

What is This Feature

The WordPress Interactive Map Plugin can be integrated with the Business Directory Plugin

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

Map with business listings - Google Maps WordPress Plugin
Map with business listings

Video Tutorial

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


1) Showing Map

You can display the map by using a shortcode [cmloc-business]

It has three attributes:

  • category - Specify one or more categories by their id or slug.
  • theme - Use one of the following values to choose the needed map theme: "silver", "retro", "dark", "night" or "aubergine".
  • categoryfilter - Set "1" to allow users to filter categories and "0" to disable it (Default is "1").
  • searchbar - Set "1" to display the search bar or "0" to hide.
  • mapheight - Define the map height in pixels.
  • mapwidth - Define the map width in pixels.
  • width - Define the width in pixels.
  • show_map_on_load - Set "1" to show the map on the page load. If set to "0", the map will be hidden. This parameter is needed to override the option Show map on page load in settings of the Business Directory plugin. Note: this option was introduced in version 3.0.6.
  • tags - Specify one or more tags. Important: this parameter accepts only tags which come from the Business Directory plugin. Example: [cmloc-business tags="shop,parking,clinic"]. Note: this option was introduced in version 3.2.3.

[cmloc-business category="id|slug" categoryfilter="1|0" show_map_on_load="1|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. Additionally, you can use the button Update the marker to match address to sync latitude and longiture with the specified address (note: this option was introduced in version 3.3.7).

Setting up Latitude and Longitude for a business - Business Directory Plugin
Setting up Latitude and Longitude for a business

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


2) ZIP Search in Business Directory

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

Example

ZIP search in WordPress business directory - Google Maps WordPress Plugin
ZIP search in business directory plugin

Enabling ZIP Search

To enable this filter, you have to check the WordPress Interactive Map plugin setting. Head to Admin Dashboard → CM Map Locations Pro → Settings → Index Page tab.

Navigation to locations plugin settingsNavigation to locations plugin settings - Maps Plugin
Navigation to locations plugin settings

Scroll down to the ZIP code radius filter section. Here we need the following 2 options:

Zip search settings - Store Locator WordPress Plugin
Zip search settings
  • Enable ZIP code neighborhood filter - Adds the two search boxes: ZIP filter and Radius.

    ZIP code and radius search in WordPress Business Directory
    ZIP code and radius search in business directory
  • 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 Directory plugin.

Still in this screen, you can also set the Radius field increments. Learn more WordPress Interactive Map Plugin (CMML) - Searching by ZIP

ZIP Code Comes From Coordinates

The Zip code of the business 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

Setting up Latitude and Longitude for a business - WordPress Directory Plugin
Setting up Latitude and Longitude for a business

3) Business Pages With a Map

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

Choose the default options in Admin Dashboard → CM Business Directory Pro → Settings → Business Page tab.

Business page settings - WordPress Local Business Directory
Business page settings

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

Option to display a map on business page - WordPress Business Directory Plugin
Option to display a map on business page

TIP: Enabling/Disabling on Single Page

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

Enabling the map on a business page - Maps WordPress Plugin
Enabling the map on a business page

Business Directory With a Map

You can show a Google map on the WordPress business directory.

Navigate to Admin Dashboard → CM Business Directory Pro → Settings → Business Directory tab.

Navigation to Business Directory Plugin WordPress
Navigation to business directory plugin settings

Find and configure the following options: 

Google Maps WordPress Plugin integration settings with WordPress Directory Listing Plugin
WordPress Interactive Map Plugin integration settings with Business Directory plugin
  • Show CM Locations Map - Enable it to show the map.
  • Map position - Select the map position on the business directory index page. Choose between:
    • Before filters
    • Between the filters and results
    • After resultsNote: this option was introduced in Business Directory plugin 2.3.1 and requires Map Locations plugin 3.0.4 and higher.
  • Show map on page load - If enabled, the map will be displayed on page load, otherwise - only when user clicks on the button. Note: this option was introduced in Business Directory plugin 2.3.1 and requires WordPress Interactive Map plugin 3.0.4 and higher.

Then navigate to Admin Dashboard → CM Map Locations Pro → Settings → Index Page.

Locations Index page settings - Maps Plugin
Locations Index page settings

Find the section Map and configure the following options:

Map settings - Store Locator WordPress Plugin
Map settings
  • Enable map - Enable this option to display the map on the Business Directory page.
  • Enable marker clustering - If enabled, multiple markers will be combined as a single when overlapping due to the zoom.
  • Enable info window on marker clustering - Shows a tooltip when clicking on a clustered marker, listing each location.
  • Marker label type - Choose the label type with the marker's name on the location's map. The options are:
    • Show always below the marker
    • Show tooltip on mouse hover
    • Do not show label
  • Clicking on the map marker will - Choose the action when the user click on the marker. The options are:
    • None
    • Open the location's page - Directs to the business page.
    • Redirect to custom URL - Directs to the address in the "URL" field of the location entry. 
    • Show tooltip with information about location - Displays part of the description without directing the user to another page. This feature has extra settings.

Example on the Front-end:

WordPress Business directory map
Business directory map

Business Promoted by Zip Code

Note: this feature was introduced in version 3.3.7 of the Business Directory Plugin

Each business can be additionally promoted by zip code. For each business you can specify a list of zip codes, and when a user searches for one of these zip codes, the search results will show him the promoted business even if it is out of the searched radius. The list of related zip codes can be defined specifically for each business.

To do this, when editing a business, find a metabox CM Business Directory Custom Fields. Find there the following options:

Promoting businesses by zip codes - WordPress Business Directory
Promoting businesses by zip codes
  • Is promoted/featured by zip codes - Enable this option to promote business when searching by zip.
  • List of promoted zip codes - Add a list of zip codes that should trigger displaying the current business as the promoted one once the user searches for one of these zip codes. Each zip code should be written on the new line. You can also import a list of zip codes from the CSV file. Check the CSV file example.

Front-end Example:

By default, all business locations are displayed on the map. Once the user enters a zip code and defines a radius, he can see a search results - it shows the businesses that are found withing the searched radius. It also shows the businesses promoted by zip - the ones where we specified related zip codes.

Searching by zip codes - WordPress Directory Plugin
Searching by zip codes

In the list of found results the relevant businesses are marked as Promoted (in List View and Business Directory View only):

Search results - WordPress Business Directory Plugin
Search results

In the business profile the user can also see that this business is Promoted:

Business promoted by zip code - WordPress Listing Plugin
Business promoted by zip code

Important

Have a note that Latitude and Longitude must be specified for business locations in order to make the zip search feature work correctly.

Setting up latitude and longitude - WordPress Directory Plugin
Setting up latitude and longitude

Also, in the dashboard for managing businesses you can see 2 new columns:

Dashboard for managing businesses - WordPress Directory Listing Plugin
Dashboard for managing businesses
  • Promoted by zip code - Allows to track if the zip code promotion is enabled for the business.
  • Place Marker - Allows to track if Latitude and Longitude are specified for the business. If not, you can click Set Marker, and both values will be automatically generated based on the address info.

More information about the WordPress Interactive Map 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
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.