Categorical Location Markers

MySLP Professional and Enterprise level services allow for locations to be categorized. Each category for a location can have its own map marker associated with the category. These markers are then displayed on the map to mark the location. (This also applies for those customers using the WordPress SLP plug-in with the Power add-on or Premier)

However, some locations may belong to more than one category. In this case the map marker that is selected to be displayed on the map is determined by the RANK assigned to the category. If multiple categories have the same rank, or no rank, then the first category by alphabetical listing will be the one selected as the “main” category for rendering the map marker.

Default map markers when no category is selected.

Filtering Locations By Category

What happens when a user decides to filter the list of categories? Only locations that are within the selected category are shown.

If the location only belongs to ONE category, as is the case for the “#1 Food Store” in our example above, the choice is easy. Show the category map marker.

But what should be displayed if a location belongs to several categories, as is the case for our “24 Seven #1” location shown in the example above?

Prior to our mid-September 2020 release of Store Locator Plus® (or the Power 5.5.7 add on for our legacy WordPress plugin users), the marker for the “24 Seven #1” location would be the highest ranked category, which is the convenience store marker.

With the mid-September 2020 release, however, this behavior has changed. The map marker displayed will be the one that matches the filter the user selected.

Since our mid-September 2020 release, category filters change the map markers to match.

Multiple Location Categories

What about Store Locator Plus® interfaces that allow users to select more than one category, such as interfaces that allow checkbox selections for categories? Markers will be chosen from the markers for the selected categories only. If a location matches 2 or more of the categories, the highest ranked OF THOSE SELECTED will be displayed on the map.

This is different from earlier versions of Store Locator Plus® where it would always display the highest ranked category map marker, even if it was not part of the checked list of categories.

Legacy Locator Styles

locator stylesheets

With built-in custom CSS rules now standard for most WordPress themes, version 5.4+ of Store Locator Plus® has dropped legacy CSS styles. Up to version 5.4 users could place a CSS file in the Store Locator Plus® plugin CSS directory and then use the Settings | View | Plugin Style to select that CSS file in place of the default “A Gallery Style”.

Adding The Style With Experience Add On

Copy the CSS from one of the legacy CSS stylesheets listed below an paste it into the Settings | View | Custom CSS box. This requires the WordPress Experience Add on.

Adding The Style With WP Themes

Custom CSS support is built into WordPress core and themes only need to tell WordPress they support that option to enable the functionality. Many modern themes now include this option. Go to Appearance | Customize | Additonal CSS and paste the CSS there.

Legacy CSS Styles

MySLP Store Locator Plus® SaaS

Users of our MySLP SaaS offering don’t have to worry about this sort of thing. The built-in style gallery will suffice for most sites and those that need custom CSS can use the built-in CSS tools provided by platforms like Wix, Weebly, Squarespace, and more.

Wix Directory Styling for MySLP

The directory listing option for MySLP makes it easy to provide a list of states in which your locations reside. The directory listing can be easily added to any Wix site by using the directory style presentation when embedding the MySLP code.

The Wix embed code presentation leaves a bit to be desired when it comes to formatting. When you drop an embed block into a Wix page it will often add far too little padding, is not centered, and does not default to a big enough height to display a list of locations.

Getting Started With The Embed Format

When using Wix we find it easier to format the MySLP embed code by using the advanced editor.

Start by adding an Embed , HTML block into the page. Wix will drop this in a random semi-centered location on the page. Drag it down to an available space on the page.

Embedding an HTML object into a Wix site.

It is best to set the embed block to be 100% the width of the content. The gutters should be marked with a dashed line to show the left/right main content width. Stay between the gutters.

Set a default height tall enough to show the listing. An embed box height of 800 is a good start.

Relocate the embed HTML box to the white space of the page. You may need to add the white space to your Wix page by tweaking the height position (Y) of the elements on your page.

Click on the embed box and look for Enter Code on the top-left corner of the box.

Enter the MySLP SaaS embed code, make sure you add <style> section and include a data-presentation=”directory” attribute on the embed script to get the directory listing in place of a map of locations.

Enter the embed code and related <style>..</style> section as noted below.

Example Embedded MySLP Directory Code

The following embed code can be added to ensure CSS styling is included along with the JavaScript-based directory functionality of MySLP.

<style>
.slp_directory_list.slp_directory_style_list {
    display: flex;
	  flex-wrap: wrap;
    justify-content: space-between;
}
.slp_directory_entry {
    padding: 0 5px;
}
</style>
https://dashboard.storelocatorplus.com/front-end/location.js

If all went well you can publish the site and should see an interactive states directory listing similar to this:

WordPress Custom CSS Rules

You can add custom CSS rules to WordPress to style your directories and location maps without having to wait for a custom Store Locator Plus® style or a theme that supports full CSS rules. WordPress has a built-in CSS customization tool that applies to all pages on the site.

You can use this custom CSS tool to do things like format the MySLP SaaS, or WPSLP plugin, directory listings.

How To Add Custom Rules

Login to your site as a site administrator.

Click on the Customize menu entry in the admin toolbar.

Click on Additional CSS in the sidebar.

Enter a fully qualified CSS rule.

This example is used to style the MySLP SaaS directory listings on the site. MySLP is a pure JavaScript embed implementation and requires the site hosting the embed to add extra CSS rules. The output changes the MySLP Directory state selector from a vertical list to a horizontal list as shown on the MySLP Directory page.

Location Directory With MySLP

Our software-as-a-service platform, MySLP, runs on many different web builders and mobile frameworks. If you are using MySLP you cannot easily create pages that contain the [slp_directory] shortcode used in the Store Locator Plus WordPress plugins. There is another way to do this with our SaaS offering.

This new MySLP feature makes it easy to add a directory of locations to any platform. Display your location directory on Weebly, Wix, WordPress, or any website management platform that supports JavaScript.

The Embed Code

When using MySLP you typically add your locations and set your map experience properties. The next step is to go to the Generate Embed page on your account dashboard to get the JavaScript needed to display the locator search form and map on your site.

Standard MySLP output with default embed code.

Embed Code For Directories

When displaying a directory, you normally do not want the location search and map to appear. You can use the data-presentation attribute with your script to tell MySLP what type of location presentation you would like to show on your site.

Here is a full script example from our test server — you can see where we added data-presentation=”directory” to the standard embed script.

<script id="MySLP" 
type="text/javascript" 
src="https://dashboard.test/front-end/location.js" 
data-presentation="directory" 
data-api-key="myslp.8322ee3d5681db51162fa332d76f74171b80b89f7a15df054c989f2d75f91a08" 
data-rest-path="//dashboard.test/enterprise_at_slp_dot_guru/wp-json/myslp/v2/locations-map" 
data-div-id="MySLP-map-wrap">
</script>

Adding data-presentation=”directory” to the script will use the directory style presentation where the <script…> embed appears versus the standard MySLP output.

Default Directory Presentation

The default setup for the directory style presentation is to show a list of states (or provinces) in a list.

Clicking on a state will show a list of locations using the results layout configuration you have set for Store Locator Plus®.

By default there is no search form, map, Store Locator Plus® tagline, or distance displayed.

An example of the Directory output with MySLP SaaS showing results after clicking the FL link.

Styling The Output With CSS

You can style the directory output by manipulating the CSS on the site where the script has been embedded. The method for adding custom CSS will depend on the platform you are using to host your site.

Horizontal List Of States

To create a horizontal list of states, add the following CSS rules (learn more about flex styling at this site) to your site:

.slp_directory_list.slp_directory_style_list {
    display: flex;
	  flex-wrap: wrap;
    justify-content: space-between;
}
.slp_directory_entry {
    padding: 0 5px;
}

Sign Up For Our SaaS Map and Directory Builder Today

Translating Store Locator Plus ADD-ONs

Store Locator Plus uses the built-in WordPress internationalization and localization tools to translate the interface text into various languages.  Store Locator Plus plug-in is part of the WordPress Translate project.  You can contribute translations for the base plugin at the Store Locator Plus directory at WordPress Translate.

If you do not see the base plugin in your language, check the SLP Translate report for the latest Stable Release and make sure your language is at 100%.  The Translate system will not create a language export for partial translations.  If you want to help with the translation, send a request to be added to the WordPress PolyGlots project.

Learn About Translate.WordPress.Org.

Custom CSS

MYSLP subscriber  with the Professional level or Enterprise level plan  , allows you to customize the style sheets ( CSS ) for Store Locator Plus  map, results, and search layouts.   There are additional styles also available with  the higher level plans making it less likely that you will need to use custom styling sheets.  If you are adding CSS to the SLP.  The CSS field  is under Settings/View under the various locator styles.

If you are an Enterprise level subscriber and need a style to work with your general theme, you may wish to contact us.  Any CSS updates entered  will be retained in future updates .

For WordPress SLP plugin users, The Experience Add On  is available to purchase for the self managed WordPress SLP plugin , the CSS is stored in the WordPress options table.

undefined property: stdclass::$plugin

If you are seeing and undefined property: stdclass::$plugin in your WordPress plugin then your software is out-of-date.

For Store Locator Plus® users that means updating your entire Store Locator Plus® software stack.   That likely means purchasing the latest add-ons for WordPress.

Stop dealing with software updates and patches.   Let us manage your locator map and directory software for you with our My Store Locator Plus® managed service.

CSV Import Duplicates Handling

The WPSLP Power Add On  or MySLP/Professional plan   allows you to import CSV files with several options.    View the information under SLP/Locations/Import .  You have various  options to consider when determining how to update  locations  that match your pre-existing locations.

Options available on how to handle duplicates:  Choose to Add, Skip, and /or Update.

T_PAAMAYIM_NEKUDOTAYIM

T_PAAMAYIM_NEKUDOTAYIM is the scope resolution operator.    In most languages it is the double-colon (::).

Most people that are looking for this odd-looking word are probably running into an issue with a PHP program.   For as often as it comes up, there is very little information on what is causing the problem.

With PHP it typically means the application has a syntax error.    The PHP interpreter cannot figure out how to compile your code properly and crashes with the Unexpected T_PAAMAYIM_NEKUDOTAYIM error message.   Often it is due to a class name or static method reference that PHP cannot handle.  Either the class name is entered incorrectly OR your PHP version is so old it cannot process variable names before the double-colon operator.

For Store Locator Plus™ users that are still using the WordPress plugins it most likely means the version of PHP you are running on your web server is very outdated.  Upgrade PHP to a newer version, preferably something that is supported in the past 5 years like PHP 7.

User that chose the fully managed Store Locator Plus™ service don’t have to worry about things like this.