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


This filter allows you to use a custom store locator template from outside of the WP Store Locator plugin folder.

Using an alternative template folder will ensure that when you upgrade the plugin, you won’t lose any of the template modifications.

Using this filter does not automatically activate your new template. You can do this in the ‘User Experience’ section on the WPSL Settings page. Look for the ‘Store Locator template’ dropdown, select the name of your custom template, and save the changes.


$templates - (array) The list of current templates.


This example loads a custom template from the “wpsl-templates” folder inside your theme folder:

The default templates are located in /wp-content/plugins/wp-store-locator/frontend/templates.


Since 1.2.20

Source File

This filter is located in /inc/wpsl-functions.php.


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