Store Locator Plus® SaaS WordPress Menus

This is a technical document about the internal structure of the Store Locator Plus® menu configuration.

MySLP SaaS WordPress Menus

How the menu descriptions are laid out:

  • position label : menu_slug [if user_can(<capability>)]
    • label : submenu_slug [if user_can(<capability>)]

Customer Menus

  • 30 MySLP : myslp-dashboard if user_can ( ‘manage_options’ )
  • 1000.1 My Profile : myslp_profile if user_can ( ‘manage_options’ )
  • 1000.2 Log Out : ../wp-login.php?action=logout if user_can( ‘manage_options’ )
  • 1000.3 Contact Us : myslp_contact_form if user_can( ‘manage_options’ )

WordPress Menu Functions

add_menu_page()

For adding “top level” menus.

add_menu_page( 
string $page_title, 
string $menu_title, 
string $capability, 
string $menu_slug, 
callable $callback = ”, 
string $icon_url = ”, 
int|float $position = null 
): string

$menu_slug is the “key” that identifies this menu, must be unique within the WP installation.

add_submenu_page()

For attaching submenus to the “top level” menus.

add_submenu_page( 
string $parent_slug, 
string $page_title, 
string $menu_title, 
string $capability, 
string $menu_slug, 
callable $callback = ”, 
int|float $position = null 
): string|false

The first parameter should match a parent slug (the 4th parameter) from the add_menu() calls.

WordPress Roles & Capabilities

WordPress roles, oddly enough, are stored for each user in the wp_user_meta table in the meta_key ‘wp_capabilities’.

Relationship definition:

  • role slug (Name)
    • capability slug – enabled by default on WP install or granted by Store Locator Plus®

The roles and capabilities within the Store Locator Plus® system include:

  • super (Super Admin)
    • manage_options
  • administrator (Administrator)
    • manage_options
    • manage_slp, granted by main SLP plugin
    • manage_slp_admin, granted by main SLP plugin
    • manage_slp_user, granted by main SLP plugin
  • subscriber (Subscriber)
    • read
  • myslp_customer (MYSLP Customer)
    • myslp_customer
    • read

WordPress Multisite Capabilities

For users on multisite there are two entries in the wp_usermeta table.

The meta_key wp_capabilities on MySLP this value has been set at a single role – ‘subscriber’.
This defines the capabilities of the user on the main site on the platform, this is the master site and should only be open to system administrators.

The meta_key wp_<site_id>_capabilities on MySSLP this value has been set to the role – ‘administrator’.
This sets the capabilities for the subsite, where each user should be the administrator for their own site.

Image by Kevin Seibel from Pixabay

Display Category Icons on Maps and in Results

Power add-on required if king the WP SLP plug-in or available with the MySLP SaaS Professional Level Plan

Add Icons to your categories under your Categories Manager. Select under Settings/View the Default with Legend below if you wish to show the icons represented for individual categories.

Under the Settings/Results check off the box to show category icons.

Search Form Labels

 Set the Labels for the Search Form

The label that will be displayed in front of the Search form box on your locator page can be changed under Settings/Search in the Appearance section Label. If none are set, a blank box will appear on your site. The “Address” Label you enter will appear in front of the search box. The “radius” information indicates to the site visitor that this is the radius (whatever radii you entered in the search form  for radii options.

Consider this label as  a help text tool for the site visitor to assist them as to what  to enter in the box.   Label Examples:  zip code, city, street, or a combination such as  address / zip code.  The more detailed the better. We find address and zip code to be the most useful hint.  If you leave this label blank nothing will appear in front of the search form box and your site visitors will be guessing what to enter to start their search.

Additional Search settings and labels are available with MYSLP Professional or Enterprise level or the WPSLP self managed with the   Experience or Premier add-ons.

With the WP Add-ons or the MYSLP SaaS professional level plan and higher you will find additional help search boxes such as Address Placeholder.

Results Layout Shortcodes and Attributes

Changing the results layout is a feature provided for Professional level accounts. Users of the self-managed WordPress plugins will find this in the Experience add on.

Default Format

The default format for the results string uses the numerical encoding for the various data elements that can be rendered.   This default string format is present in the base Store Locator Plus plugin.  You can reset  to the default at any time by deleting the entry in the Results Layout field under  Settings/Results/Appearance and saving the settings.

Recovering From Critical Error After WordPress Plugin Updates

petaled flower drawing on white egg shell

This article provides information on how to recover from critical errors after a plugin update. Critical updates can occur for a variety of reasons. These errors can take your WordPress site offline until the error is resolved.

For the purpose of this article we are going to delve into an example where a Store Locator Plus® add on is running an outdated version and the base plugin is updated to an incompatible version. While newer versions of the Store Locator Plus® plugin will auto-detect incompatible add on versions and disable them automatically, there are some third party add ons that do not report version updates properly and can prevent this auto-detection from working.

Here is how to recover from these issues.

Getting Started with Store Locator Plus®

This article covers the first 3 steps (2 if you are using our SaaS product) for getting started with Store Locator Plus®.

Store Locator Plus® makes it easy to add interactive location maps and directories on your website. Our latest technology is included in the Store Locator Plus® Maps and Directories SaaS offering. Some of our customers still prefer the self-managed WordPress plugins available via our Store Locator Plus® for WordPress plugins.

Regardless of which method you prefer, both can be setup quickly and have a fully functional site map or directory listing online in minutes.

Step 1: WordPress Store Locator Plug-in Users Need A Google API Key

SaaS users can skip this step. Store Locator Plus® for WordPress plug-in users need a Google API key to utilize the full features available in the the plugin. WordPress administrators who are self-managing their plugin updates, security, and Google services need to setup a Google API account so they can start billing for map services. 

If you are a subscriber to  Store Locator Plus® – our SaaS directory and locator service, you can ignore this page, we’ve got it covered. Go to our Getting Started guide and move on to Step 2.

For the Store Locator Plus® for WordPress users these instructions are a general guideline. You will need to visit the Google developers page and read their User guide to obtain a new account or update your existing account. Google will bill you directly for your monthly map views and location look-ups.

Step 3: Add A Location Map To Your Site

stock

Add a location map to your site by putting the SaaS embed code or WordPress shortcode on any page. You’ll need to have an active Store Locator Plus® SaaS subscription or have the Store Locator Plus® for WordPress plugin installed and activated.

Make sure you’ve completed the initial configuration and setup steps outline in the Store Locator Plus® Getting Started article.

When a visitor goes to a page with the Store Locator Plus® map code embedded, it will show a default search form and a map centered in your country or on the “Center Map At” address you entered when configuring Store Locator Plus®. When someone searches for a zip code that is close enough to a location you entered it will show those locations on the map.