Creating A List Of Location Pages [slp_pages]

This feature is available with an active Premier Subscription only.

Create a list of location pages, the Store Pages created by the Pages option of the Power add on, requires version 4.5 or later of the Power add on with the Pages option enabled.

Listing location pages is done by adding the [slp_pages] shortcode to your WordPress page or post.   Only published Store Pages are shown.   By default new pages created via the Manage Locations interface are created in ‘draft’ mode.

The [slp_pages] Shortcode

With not attributes set the [slp_pages] shortcode will create a list of all locations that contains the location name, address, and description.

The Category Attribute

Adding the category attribute will filter the list to only show locations that are in the specified category.  Categories are set using the categories feature of the Power add on.   You must have created categories and assigned them to locations.   You must use the category name.

[slp_pages category=”wholesale”]

The Max Locations Attribute

By setting the max_locations attribute you can limit how many locations are returned in your pages list.  By default all locations are listed.   You can set max_locations=”-1″ to force all locations to be listed.

[slp_pages max_locations=”15″]

The Order Attribute

Adding the order attribute determines the ascending or descending order for sorting the list of pages.   Set the value to ‘ascending’ (default) or ‘descending’.   order=”a”, “asc” , “d”, “desc” will also work.

[slp_pages order=”asc”]

The Order By Attribute

Adding the order_by attribute determines which element of the page should be used for sorting the list of pages.   This option uses the WP_Query object to set the order by clause.

[slp_pages order_by=”title” order=”asc”]

Some of more useful options available include:

  • ‘ID’ – Order by post id. Note the capitalization.
  • ‘title’ – Order by title.
  • ‘name’ – Order by post name (post slug).
  • ‘date’ – Order by date.
  • ‘rand’ – Random order.
  • ‘menu_order’ – Order by Page Order. Used most often for Pages.  The order field is set via edit pages in the Edit Page Attributes box.

The Style Attribute

The style attribute determines the layout for the list of locations.   Default is ‘summary’ which shows the location name, address, and description.

Full Style

When the style attribute is set to ‘full’ the output will be a list of location names with a heading tag followed by the full content as specified by the Store Pages page template.

[slp_pages style=”full”]

List Style

When the style attribute is set to ‘list’ the output will be a bullet list of the location names.

[slp_pages style=”list”]

POWER 4.5 [slp_pages style="bullet"]
POWER 4.5 [slp_pages style=”bullet”]

Summary Style

This is the default mode if no style is specified.

When the style attribute is set to ‘summary’ the output will be a list of location names with a heading tag followed by the address and description.

[slp_pages style=”summary”]