Results Layout Shortcodes and Attributes

The ability to change results layout is included in the Experience add on.

Results 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 Experience/Results/Appearance and saving the settings.

Results layout section 4.4. exp

Results Layout Shortcodes

The Results Layout is a combination of HTML and special shortcodes that are only active when rendering locations.  These strings can be reordered or deleted if you have the Experience Add-on (or Enhanced Research ).  Display a specific location field, such as a store name, or a location data element, such as  distance,  where you want it to  appear in the results layout.   Location fields are data taken directly from the location data table.

You can output a single field (using the correct data field name as shown under Location  import) with the [slp_location <location_data>] shortcode in the results layout.

Examples:

[slp_location address]

[slp_location address2]

[slp_location city]

[slp_location city_state_zip]

The city followed by the state followed by the zip with USA-style formatting.   If the city and state are not blank a comma is inserted between the two.   The zip is at the end with a space before it if either city or state are not blank.

[slp_location country]

[slp_location email]

Display the email.  This is not clickable just the raw email.  You will likely want to use email_link from the Experience add-on instead.

[slp_location hours]

The raw hours text, not HTML sanitized.

[slp_location hours_sanitized]

The hours text field with all special characters decoded using JavaScript text formatting.

[slp_location url]

Display the url.  This is not clickable just the raw url.  You will likely want to use web_link or url_link instead.

[slp_location url_link]

Display the url in a clickable link.  Displays the full URL instead of the website label.  Use web_link if you prefer the website label.  The website label can be changed with the Experience add-on.

[slp_location web_link]

This will be the location URL from the location database OR a link to the  Pages web page if “pages replace website” is enabled in  Pages.   The text will be the website label text.

Additional Location Data

The Power and Extended Data Manager add ons allow additional fields to be added to locations.   They can be output using the [slp_location data.<slug>] shortcode.

Read the related results layout documentation pages for details.

Add Ons That Support This Feature

Buy the Experience Add On

Buy the Experience Add On