Additional Layout Shortcodes with Power Add-on

If you have the Power Add-on in addition to the Experience Add-on you have additional fields that can be displayed with the use of shortcodes and attributes.

Contact Fields

The Power Add-on has Contact Fields that can be associated with your locations for adding internal special  ids  for updates or to add filters. The contact fields will not automatically appear in your results on the front end.

Shortcodes for StoreLocatorPlus and Add-ons

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

Tags For Locations

Tags are text labels that can be used as identifiers and can be added to any location if you have WPSLP (do it yourself) Power Add On,  or with the  Professional level subscription for MYSLP.   It is a quick and informal way to add filters or for grouping features to your Store Locator Plus locations.

Administration

Settings for Store Locator Plus Tag Search are under the  Settings/Search section when you have the Power Add On installed.

Turning On Tag Searching

Tag based searches are off by default.  Set the Search Form Tag Input to something other than “none”.

Custom Label For Tag Searching

You can set a custom label for the tag search input. By default the label is blank. Leave blank type in what you want to appear for the Search By Tag Label: entry

Pulldown or Text Input

You can elect to have either a drop down or a text box input for users when filtering results by location tags. The default mode is to allow for free-form text input. To use the other methods you must enter a series of your tags separated by commas.

Providing

An “Any ” Selection On The Tag Drop down

You can also provide an “any” selection which will search for all locations, in addition to the list of tags you enter on the drop down. Check off the “show any” setting and Store Locator Plus will automatically add the phrase “any” to the top of your search list.

dropdown with tags option
dropdown with tags option

The Store Page [storepage] Shortcode

The [storepage] shortcode is used by the Pages and Power add ons to render live location data on a location (store) page.     The template is set under the Pages / Settings tab in the Initial Page Features group via the Page Template setting.

The [storepage] Shortcode

By default the [storepage] shortcode does not output any content.   You need to use one of the following attributes to generate location-specific output.

Attributes

  • class – augments the tag attribute with the specified CSS class
  • field – specify which location field to display
  • hard_coded_value – output the text in the wrapper
  • map – show a map with the location marker
  • post – output the WordPress post attributes for the page
  • tag – wrap the output with the specified HTML tag
  • title – output a title for list of pages
  • type – specify the type (style) for the output