WordPress blog posts likes to use curly quotes instead of straight quotes whenever you write an article. Our documentation site is built on WordPress which means many of our articles are replaced any quotes we type in an article with curly quotes.
The problem is that the WordPress shortcode processor does NOT like curly quotes. If you use curly quotes in a shortcode attribute such as [slp_directory by=”city”] and those quotes are “curly”, WordPress treats the quotes as a plain-old alphabetic character just like the C-I-T or Y in “city”. In other words WordPress things you mean “by quote-city-quote” not “by city”.
Why is that an issue?
If you copy-and-paste most examples from this documentation site WordPress will copy the “pretty curly quotes” into your shortcode. If you paste that into your WordPress page it breaks.
An example of how this can impact Store Locator Plus can be seen from my example where I pasted the slp_directory shortcode directly from the docs site into my test site. I get an invalid data query because WordPress added curly-quotes to my data field name. The SLP database does not have a field name quotesl_storequote but does have a field named sl_store.
Make sure you re-type each quote manually. Typing the ” in your blog instead of copy-and-paste will ensure you are getting “straight quotes” in your shortcode attributes not curly quotes.
This is how the example looks now that the curly quotes have been replaced with straight quotes.
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.
The Field Attribute
The field attribute is used to output location data fields from the current active location linked to the page. The field names should be the field slug. They slug is not case sensitive. By default a slug is the field name in lowercase with no spaces.
This will also set the field name used for some of the other attributes. Thus is is important to list this first if using some attributes such as the “type” attribute.
The ability to change results layout is included in the Experience add on.
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 Settings/Results/Appearance and saving the settings. Continue reading “Results Layout Shortcodes and Attributes”→