Page Template

The Page Template setting on the Pages tab allows you to change the default page layout for a store page. The template should be written using basic HTML as allowed by the WordPress page editor in “text” (versus visual) mode.

The [storepage] shortcode works for Pages only. It allows any field from the base Store Locator Plus locations table to be output on the page.

Field Attribute

You must specifiy a field to output by using the field attribute. For example [storepage field=”sl_store”]. As of version 3.9 of Store Locator Plus the field names are:

  • sl_id
  • sl_store – the store name
  • sl_address
  • sl_address2
  • sl_city
  • sl_state
  • sl_zip
  • sl_country
  • sl_latitude
  • sl_longitude
  • sl_tags – the comma separated raw tag list from Pro Pack
  • sl_description
  • sl_email
  • sl_url – the website URL
  • sl_hours
  • sl_phone
  • sl_fax
  • sl_image – the image URL if entered
  • sl_pages_url – the store page URL
  • iconarray – display an array of Tagalong category icons.

To reset the Page Template to the default value, expand the Page Layout Template under the Pages/Initial Page Features and just erase what was in there, delete, save settings, and the Page Template will go back to the new default, you must update SLP 4.3.13 or above and Pages 4.3.01.

The revised Default Page Template has eliminated any href of shortcodes in an html string as WordPress 4.2.3 no longer allows that.

Default Page Template 4.3.01
Default Page Template 4.3.01

As of Store Pages version 3.10+ you can leave off the preceding sl_, so sl_store becomes field=”store”.

Type Attribute

You can add a type attribute to modify the way the field data is rendered. (version 3.10+) As of WP update 4.2.3 you can no longer have a shortcode in double quotes. In other words, WP no longer allows quoted shortcodes inside of quotes

  • hyperlink – will prepend http:// to the field data if it does not already start with http://Example: [storepage field="url" ];[storepage field="url"];

Adding A Map

Here is one method for adding a map to the Store Pages template using an iframe within the template:
There is a new shortcode that renders a direct Google Map with JavaScript if you have Pages (formerly called Store Pages) 4.3 installed.
The 4.3 version contains some new shortcodes, in particular this one will be helpful:
[storepage map=”location”]

  • Note: Some themes may cause  a conflict on your individual Store Pages.  We have been notified by a forum contributor  that the “Ronneby” Theme is one of those themes that interrupts  the map being displayed on individual Store Pages. There may be others out there.  Pages follows the WP taxonomy and Posting structure.

Google Maps Iframe Method

Google recently changed their map embedding feature.   Using an iframe now requires that you sign up for an API key via Google Developer Console.  You must turn on the Google Maps Embed API and then fetch your credentials so you can paste your API key into the URL string for the iframe source.
Please note: WordPress, also changed the best practices and you need to really know what you are doing and be very familiar with the WP codex and dichotomy.

Also,  Google will limit your website to 2,000 map renderings per day before they ask you for money to increase that limit.