1. Description
  2. Parameters
  3. Usage
  4. Changelog
  5. Source File
  6. Related


This filter allows you to change the default options for the address shortcode.

By default, all the address and contact details are shown on the store pages.


$shortcode_defaults - (array) The current defaults for the [wpsl_address] shortcode.

The available shortcode attributes:

idThe id of the store you want to show the address for. This is only required if you use this shortcode on a page that isn't a store location page.
nameTrue or false
addressTrue or false
address2True or false
cityTrue or false
stateTrue or false
zipTrue or false
countryTrue or false
phoneTrue or false
faxTrue or false
emailTrue or false
urlTrue or false


This example will set the country to false, which will hide it from the shortcode output:


Since 2.0

Source File

This filter is located in /frontend/class-frontend.php.


The code needs to be placed in the functions.php file inside your active theme folder.