[slp_directory] Shortcode

The [slp_directory] shortcode is used to place a directory listing on a page or post.    There are two main modes of operation for the shortcode which is determined but the listing style selected.   The list style is determined via the style attribute.     The two modes are “list mode” and “landing page” mode.  These modes are described below.

Attributes

The following attributes apply to the [slp_directory] shortcode.

by=”<field_slug>”

Determined which field to build a list on when style is set to list or list_with_count.   See List Mode below for more details.

slp_directory with landing_page attribute
slp_directory with landing_page attribute

if_blank_use=”<field_slug>”

If the specified field in the by=”<field_slug>” attribute is blank, output the specified if_blank_use field instead.

This can be particularly helpful when using the additional territory field that is added by the Power Add On where you wish to built a listing based on territories, but do not wish to skip locations that do not have a specific territory assigned.

For example:

This will list all of the territories assigned to locations within the system.  Any location that does not have a territory assigned will create a city entry on the territory list.    When the list is linked to a Store Locator Plus map page, as is shown above, the link will create the proper city or territory-centric search.

landing_page=”<relative page url>”

If set the list that is generated will link to this page and pass along the field and field value to the landing page.   When pointed to a WordPress page or post that includes the slp_directory style=”landing_page” shortcode, the landing page will automatically generate a location details list for all locations where the by setting above matches the value on the list.   For example, show all locations in the city of Charleston.

locator_page=”<relative page url>”

If set the list that is generated will link to this page and pass along the field and field value to the locator page.   When pointed to a WordPress page or post that includes the slplus shortcode, the locator search form and map will automatically search all locations where the by setting above matches the value on the list.   For example, show all locations in the city of Charleston.

style=”list |  list_with_count | landing_page | title”

Determine the style of listing.

List is a simple list of the property specified in the by attribute, such as a list of cities.

List_with_count is the same as the list style with the addition of a count of locations in parenthesis.

Landing_page is a special mode that expects to get information from a list or list_with_count directory page that has specified a landing_page.   This mode will output a detailed list of locations that match the specified “by” field.

Title will display the current filter by field followed by the filter value.  For example “City Charleston”.  This can be used to prepend a landing page output or a locator map.

text_if_blank

The text_if_blank attribute provides a way to set optional text to display if the specified “by” field is blank.   This features is provided via the Premier Plugin available exclusively to Premier Subscriptions.

List Mode

Use the slp_directory shortcode to show a list of your location attributes, such as a list of cities or countries where you have locations. The list is dynamic and will change whenever you change your location data. The list can link to a Store Locator Plus map page or to a direcotry landing page.

Landing Page

Use the slp_directory shortcode with a style=”landing_page” attribute to create a page that will automatically list all the locations that match a specific location attribute, such as all locations in a given city. This page is meant to be hidden from the general user interface on your site. It is meant to be linked to from the automated List Mode output.

Filtered Locations Only In SC
Filtered Locations Only In SC

Add Ons That Support This Feature

Enroll in a Premier Subscription
Support product development : Purchase a Premier Subscription
Buy The Power Add On
Buy The Power Add On