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

Appearance Layouts

Experience Add-On or Professional level MySLP SaaS

The Experience Add-on  for WordPress SLP plug-in , or the Professional level or higher plan for MySLP Software-as-a-Service application allows you to customize the layouts, the map interface, and the search form to display in a certain manner on the front end of your locator page

Search Layout

Search Layout is found under the Settings tab on the Search panel.

This setting allows the search form layout to be modified via a text setting.   If the Search Layout field is left blank the default search form layout and  your SLP style is used.   If Search Layout is modified the layout will take precedence over most of the Search Form settings  and the basic Store Locator Plus.

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.

Geocoding stopped working suddenly

(This page has been updated to reflect the changes in Google Cloud Platform API changes)

Most likely reasons;

  • You moved your site or changed the domain name and did not change your Google Map API key or , as of JUNE 2018 Google API changes, did NOT ADD BILLING TO YOUR API KEY . See Getting Started
  • Check your Google Platform Usage reports
  • A self-imposed usage cap has been exceeded.
  • The provided method of payment is no longer valid (for example, a credit card has expired).
  • You have exceeded the QPS limits for a given API.
  • If you have the Power add-on and are using the import function , your csv file is incorrect, or your header rows are not accurate,  or they have wrong field names, the columns may be misaligned and the data field for an address could not import and/or does not geocode. Check your import message log.
  • Google does not recognize an address. See FAQ post

How to validate Premier with Multi-site Installations

Enroll in a Premier Subscription

Premier Subscription Licenses must be validated on the primary site of a multi-site install. This is typically the FIRST site in your site list, but can be changed via wp-config. If you are using multi site you should know which site is the primary Blog ID. Adding your Premier id and your license on your sub sites will not validate the WPSLP Premier license. (This information only applies to WordPress SLP and not MYSLP.

Communication with the SLP license server is required for any licenses to be validated. You can check if standard web requests are working between your WordPress install and SLP. This can be tested from within your PHP environment with a simple PHP script that uses a ‘curl’ or ‘file get contents ‘operation.

You can also click on the Store Locator Plus / info tab in the back end of the plug-in. If you are seeing “Latest News” with fairly current dates then the problem is most likely not a blocked communications via a firewall. In those cases the issue is most likely an incorrectly typed subscription ID or you have entered the info on the wrong site of a multi-site install.

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.

Load Locations from WordPress Locator to MYSLP®

Load locations does not replace the  csv file import functionality available to the MySLP Professional or Enterprise level plan subscribers but it  can be used to  load  basic location data from your WordPress Store Locator Plugin (such as WP Store Locator Plus®,) into your SLP SaaS account.  (The basic load will not load category tables. You would need to use  import  csv file for that.)

This functionality can be found from the MYSLP account, the SLP sidebar tab and under Locations as shown in the screenshot below.

The  loader supports loading locations from WordPress sites running the WordPress Store Locator Plus plugin.

If you are using a locator or directory plugin other than Store Locator Plus, please contact us to discuss the possibility of beta testing if it does not load.

Map Controls

More map controls

Our MYSLP Enterprise level users or WPSLP Premier subscribers will find several additional map controls to enable or disable built-in Google Map elements.  A simple checkbox  allows users to turn the Full Screen and zoom controls on or off in addition to the previously-available  Hide “Stick Man” , scale, and type controls.

This option is also available to WordPress plugin users with an active Premier subscription.