[slplus] is the primary shortcode used within WordPress sites to display the Store Locator Plus map and location search interface. Many other attributes can be found within the plugin and add-ons.

A shortcode is a special label inside of square brackets that is used within WordPress pages and posts to display the output from a plugin. You place a shortcode within the text of your page or post and the plugin will “do it’s magic”.

Note: Shortcode attributes WILL NOT WORK if Force Load JavaScript is turned on under Store Locator Plus General Settings. Try turning it off before using attributes. If Store Locator Plus won’t load when you turn Force Load JavaScript off, get a different WordPress Theme that fully implements WordPress code standards.

Note: As of  WordPress Plugin API update 4.2.3 effects shortcodes with filtered styles which will not be recognized when stored between quotes.

Locator Shortcode

To display the Store Locator Plus search form, map, and search results using the defaults you have setup via Map Settings in the admin panel, use the following shortcode:

[SLPLUS]

The base plugin will replace the shortcode with a search form, a Google Map, and a results section below the map. Depending on how you have the plugin configured the map and results may start by showing some or all of your locations.

Extended Attributes

You can use the following settings to modify how the store locator interface is displayed on the page.

Provided by Store Locator Plus:

Provided by Experience:

  • address_placeholder=”string”
  • add_tel_to_phone=”true|false”
  • allow_addy_in_url=”true|false”
  • append_to_search=”string”
  • center_map_at=”address string”
  • city=”city name”
  • city_selector=”discrete|hidden|input”
  • country=”country name”
  • country_selector=”discrete|hidden|input”
  • disable_initial_directory=”true|false”
  • endicon=”url string”
  • google_map_style=”string”
  • hide_address_entry=”true|false”
  • hide_map=”true|false”
  • hide_search_form=”true|false”
  • homeicon=”url string”
  • ignore_radius=”true|false”
  • immediately_show_locations=”true|false”
  • map_region=”cctld country code”
  • no_autozoom=”true|false”
  • no_homeicon_at_start=”true|false”
  • order_by=”string”
  • results_box_title=”string”
  • show_map_toggle=”true|false”
  • starting_image=”image URL”
  • state=”state name”
  • state_selector=”discrete|hidden|input”
  • url_allow_address=”true|false”

Provided by Power:

Attributes are added inside the short code, for example: [SLPLUS center_map_at=”Charleston, SC”]

address_placeholder

The string that is placed in the address input box as a placeholder until the user starts typing.

Requires Experience Add On.

allow_addy_in_url

Determine whether or not the current locator page allows addresses to be passed in via the URL string.

Requires Experience Add On.

center_map_at

Overrides the address where the map will be centered. This attribute will only work if Force Load JavaScript is disabled. Turn this off on the Map Settings page in Store Locator Plus. If the map stops working when turning off Force Load JavaScript, your theme is not properly updated to work with WordPress and does not handle footer action hooks. Contact your theme author and ask them to add footer action hook process as noted in the
wp_enqueue_scripts() section of the WordPress Codex.

Example

[SLPLUS center_map_at="Pasadena CA 91106"]

city

Set a city string for use with the hidden city input. This will force the search to use discrete mode filters and only return those results where the city matches the EXACT text entered here. Cities should include the city and state separated by a comma and space. For example: Charleston,SC.

Requires Experience Add On.

Example

[SLPLUS city_selector="hidden" city="Charleston, SC"]

city_selector

Determine which city selector interface is to be displayed on the map.

Requires Experience Add On.

Values

This attribute can be set to:

  • discrete – show a drop down menu that is used to filter searches to only return locations that EXACTLY MATCH the
    city the user picks on the drop down menu.
  • hidden – hide the city selector input
  • input – show a drop down menu that will automatically fill in the address search box with the state the user
    picks on the menu, allowing the user to further modify the address such as adding a street to the city. This is
    used when you want to give the users some hint as to where your locations are but still rely primarily on radius
    based search results.

Example

[SLPLUS city_selector="discrete"]

country

Set a country string for use with the hidden country input. This will force the search to use discrete mode filters and only return those results where the country matches the EXACT text entered here.

Requires Experience Add On.

Example

[SLPLUS country_selector="hidden" country="Germany"]

country_selector

Determine which country selector interface is to be displayed on the map.
Requires Experience Add On.

Values

This attribute can be set to:

  • discrete – show a drop down menu that is used to filter searches to only return locations that EXACTLY MATCH the
    country the user picks on the drop down menu.
  • hidden – hide the country selector input
  • input – show a drop down menu that will automatically fill in the address search box with the country the user
    picks on the menu, allowing the user to further modify the address such as adding a street to the country. This
    is used when you want to give the users some hint as to where your locations are but still rely primarily on
    radius based search results.

Example

[SLPLUS country_selector="discrete"]

endicon

This will override the Map Settings destination icons on a per-page basis. The URL can be relative to your WordPress site or a fully qualified URL.
Requires Experience Add On.

Example

[SLPLUS endicon="http://d.csa.com/wp/wp-content/plugins/store-locator-le/core/images/icons/a_marker_azure.png"]

google_map_style

A properly-formatted JSON string that includes the various options available for Google internal map styling.  Some of the Store Locator Plus style gallery entries contain Google Map Styling settings.

Requires Experience Add On.

hide_map

Show or hide the map on a per-shortcode basis. Note: As of Enhanced Map 4.3, a drop down selector when Enhanced Map is installed and current may be used instead: Show Map, Hide until Search, or Display Image until search.
Requires Experience Add On.

Example

[SLPLUS hide_map="true"]

hide_search_form

Turn the search form on or off on a per-page basis. Themes and CSS settings that hide the search form will take precedence over this setting. This setting takes precedence over the Enhanced Search “hide search form” checkbox.
Requires Experience Add On.

Examples

[SLPLUS hide_search_form="true"]
[SLPLUS hide_search_form="false"]

homeicon

This will override the Map Settings home icon on a per-page basis. The URL can be relative to your WordPress site or a fully qualified URL.
Requires Experience Add On.

Example

[SLPLUS homeicon="http://d.csa.com/wp/wp-content/plugins/store-locator-le/core/images/icons/bubble_person.png"]

ignore_radius

Ignore the radius, return all results that match the filters and search criteria provided up to the location limit specified. Shortcode attribute takes precedence over the admin panel “Ignore Radius” setting.
Requires Experience Add On.

Radius

Turn off the radius limitation for the page containing the shortcode:

[SLPLUS ignore_radius='true']

Use the standard radius limitation to return results.

[SLPLUS ignore_radius='false']

immediately_show_locations

Overrides the global immediately show locations setting on a per-page basis. When set to true the page will bring up locations based on the Center Map At and Radius To Search Initially settings.
Requires Experience Add On.

Immediately Show Locations

Show locations within the default radius of the default map center.

[SLPLUS immediately_show_locations='true']

DO NOT Immediately Show Locations

The user must search for an address before locations are shown.

[SLPLUS immediately_show_locations='false']

initial_radius

Override the default initial radius used for immediately show locations mode.

Example

[SLPLUS initial_radius="5000"]

initial_results_returned

Override the default initial results returned for immediately show locations mode.
Requires Experience Add On.

Example

[SLPLUS initial_results_returned="1"]

no_autozoom

Override the default Do Not Autozoom setting.

Requires Experience Add On.

Example

[SLPLUS no_autozoom="true"]

[SLPLUS no_autozoom="false"]

no_homeicon_at_start

Override the default No Home Icon At Start setting.

This determines whether or not to show the home icon from which all initial distances are calculated when first loading the map.  The default is off since most users are not going to want to see where you’ve set the center of your map (default: center of the United States).

Requires Experience Add On.

Example

[SLPLUS no_homeicon_at_start="true"]

[SLPLUS no_homeicon_at_start="false"]

only_with_category

When this shortcode option is provided the map will only display results that have been assigned the specified category. The only_with_category attributed must be set to the catgory slug. It is not case sensitive.
Requires Power Add On.

Example

[SLPLUS only_with_category="adventure"]

only_with_tag

You can also force the search form to only return results that match a specific tag by using the ‘only_with_tag’ attribute. For this feature to work, you must have the tag input option turned on in map settings. This setting will override the default pulldown and the shortcode attribute “tags_for_pulldown”.
Requires Power Add On.

Example

[SLPLUS only_with_tag="churches"]

order_by

Set the default results order, overriding ordering options set Globally. This is a feature for advanced users. This parameter
Requires Experience Add On.
required proper data field
names
to be used in the attribute values. If they are incorrect the search results may break. The value of this attribute should be the ORDER BY clause of a MySQL statement for the Store Locator Plus base and extended data tables. If you are not certain about the field names you can use a tool like the Database Peek plugin to view the *store_locator and *slp_extendo table structures to get the field names that are available.

Sort By Featured Locations At Top, Then Store Name

This will put all featured locations within the search radius at the top of the list sorted by store name followed by all non-featured stores in the radius sorted by store name.

[SLPLUS order_by="featured DESC, sl_store ASC"]

Defaults Distance Based Results

Sort all results by closest to furthest from the searched or map-center address.

[SLPLUS order_by="sl_distance ASC"]

results_box_title

The string for the results box title for Store Locator Plus styles in the Style Gallery that support it.

Requires Experience Add On.

show_maptoggle

Show the map on/off slider on the user interface.
Requires Experience Add On.

Example

[SLPLUS show_maptoggle="true"]

state

Set a state string for use with the hidden state input. This will force the search to use discrete mode filters and only return those results where the state matches the EXACT text entered here.
Requires Experience Add On.

Example

[SLPLUS country_selector="hidden" state="SC"]

state_selector

Determine which state selector interface is to be displayed on the map.
Requires Experience Add On.

Values

This attribute can be set to:

  • discrete – show a drop down menu that is used to filter searches to only return locations that EXACTLY MATCH the
    state the user picks on the drop down menu.
  • hidden – hide the state selector input
  • input – show a drop down menu that will automatically fill in the address search box with the state the user
    picks on the menu, allowing the user to further modify the address such as adding a street to the state. This is
    used when you want to give the users some hint as to where your locations are but still rely primarily on radius
    based search results.

Example

[SLPLUS state_selector="discrete"]

starting_image

Override the global starting image URL.

Requires Experience Add On.

The starting image is used when you have the Map Display set to “Image Until Search” which places an image where the map usually resides until a user enters and address and performs a search at which point the image goes away and the map appears.

To use a starting image to show in place of the map prior to a user search:

[slplus starting_image="https://s3.amazonaws.com/storelocatorplus/graphics/2017+Branding/SLP-FYB-Map-800x450.png"]

When you have a default starting image set but have one page where you want locations show immediately instead of the starting image you can remove it for one specific page:

[slplus starting_image=""]

 

tags_for_pulldown

You can override the default drop down list of tags (available with the Power add-on) on any page by using the tags_for_pulldown attribute on the shortcode. You specify each entry that you want to have appear on the drop down separated by commas. In order for the search results to return a value the tags will need to be entered exactly as they were input in the database when adding locations. Like the default pull down entries specified on the map settings page, you can specify the default by putting it in parenthesis. The custom pull down list will continue to honor the “include any” setting on the map settings page. If that option is checked off then your custom tag list will start with (any) that will match any entry in the database regardless of what tags are associated with the location. For this feature to work, you must have the tag input option turned on in map settings.

Requires both Power and  Experience Add On.

Example

[SLPLUS tags_for_pulldown="food banks,clothing for needy,(shelters),counseling centers"]

theme

You can have a different Store Locator Plus theme on each page of your site that is using the store locator shortcode.

Example

[SLPLUS theme="csl-slplus-boxed"]

pages

There is a new shortcode that renders a direct Google Map with JavaScript if you have Pages active.
Requires Power Add On.

That version contains some new shortcodes, in particular this one will be helpful

Example

:
[storepage map=”location”]

Experience Add On

append_to_search

[slplus append_to_search=' Australia']

When a user types in the search form address box, whatever text  the site administrator adds  (in quotes after the equal sign) will be appended to the search before it is sent to the map service.

center_map_at

[slplus center_map_at='Charleston SC 29401']

When this shortcode is used, it will set the default map center on your page in place of the global default in the Store Locator Plus admin panel. If no center map at address set under Settings/Map tab, the default is the center of the map domain you selected.

city

[slplus city='Charleston SC']

Limits the results to the specified city.

country

[slplus country='USA']

endicon

[slplus endicon="http://.../xyz.png"]

hide_map

[slplus hide_map='1']

Number 1 indicates the Hide the map command is on.

homeicon

[slplus homeicon="http://.../xyz.png"]

initial_results_returned

[slplus initial_results_returned='30']

map_center

[slplus map_center='Charleston SC 29401']

Alias for center_map_at.

map_region

[slplus map_region='bg']

Set this as the default region used to influence map searches. A 2-letter country code.

orderby

[slplus orderby='store']
[slplus order_by='store']

Sort location results by this location attribute.

show_maptoggle

[slplus show_maptoggle='1']

Show the map on/off switch on the user interface.

state

[slplus state='SC']

Limit results to this state.

Power

The Power
add-on
provides added functionality and features for large location lists, SEO management, and categorization of locations.

 

only_with_category

[slplus only_with_category=”orange”]

only_with_tag

[slplus only_with_tag=”red”]

tags_for_pulldown

[slplus tags_for_pulldown=”red,green,blue”]

tags_for_dropdown

[slplus tags_for_dropdown=”red,green,blue”]

Alias for tags_for_dropdown

Complete List

Store Locator Plus 4.9.7 was redesigned to allow all Smart Options to be set via the [slplus] shortcode attributes.    Most are defined above, but there are some others that were previously unavailable.   Some of the following attributes will require Power, Experience, or Premier add ons to function.

Add Ons That Support This Feature

Buy The Experience Add On
Buy The Experience Add On
Buy The Power Add On
Buy The Power Add On