Using The Shortcodes

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".

Our shortcode tag is SLPLUS. The different ways to use it our explained below.

The SLPLUS Shortcode (shortcode: SLPLUS)

To display the [mc-closeststore:|Store Locator Plus] search form, map, and search results using the defaults you have setup via Map Settings in the admin panel, simply use the following shortcode:

[SLPLUS]

Note, you can also use the legacy STORE-LOCATOR tag as well. The SLPLUS tag was introduced in Store Locator Plus v1.8.

Shortcode Attributes

Extended shortcode attributes is a Pro Pack feature.

Overriding Tab Pulldown Menus (attribute: tags_for_pulldown, version: Pro Pack 2.4+))

You can override the default pulldown list of tags 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 pulldown 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 pulldown entries specified on the map settings page, you can specify the default by putting it in parenthesis.

The custom pulldown 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.

Example

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

For this feature to work, you must have the tag input option turned on in map settings.

Restricting Results To A Single Tag (attribute: only_with_tag, version: Pro Pack 2.4+)

You can also force the search form to only return results that match a specific tag by using the 'only_with_tag' attribute.

Example

[STORE-LOCATOR only_with_tag="churches"]

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".

Theme Selector (attribute: theme, version: Pro Pack 2.7+)

You can have a different Store Locator Plus theme on each page of your site that is using the store locator shortcode. The value is set to any of the .css files (except admin.css) that is in the ./core/css directory.

Values

Possible values as of version 2.7 include:

  • csl-slplus-boxed-fastfood
  • csl-slplus-boxed
  • csl-slplus-dark
  • csl-slplus-nomap
  • csl-slplus-noresultstable
  • csl-slplus
  • default

Example

[STORE-LOCATOR theme="csl-slplus-boxed"]