logo

Agile Store Locator - Knowledge Base

How can I change Address format?

Agile Store Locator List items render with JS Template, you can modify anything you want within the right template file, to change the Address format based on your requirement such as "80204 DENVER Colorado, US", "L1Z 1L9 ajax, Ontario Canada" or your own order can be created, you have to modify the Template file, please follow the guide steps.

  1. First of all, Goto Plugins Editor, Select Plugin to Edit, Agile Store Locator. Now you have to see which template, you want to modify, the default Template is "Template-0", select "Template 1" or "Template 2" file in case you want to use that, in this guide article we will use the default template, all three Template files are under /public/partials/ directory, select the right file and make backup of it to avoid any problem.

    WordPress Plugin Editor

    Image of WordPress Plugin Editor, WP Version (4.9.5)

  2. Search for {{:address}} in the content of the file, which is complete Address that appears on your Store List.

  3. Now replace it with your own version of Address Format with it, you can use any of the format.

    {{:city}}, {{:postal_code}}, {{:state}}, {{:country}}

    {{:postal_code}}, {{:city}}, {{:state}}

    {{:postal_code}}, {{:state}}, {{:country}}

  4. Click on "Update File" button to save the changes, and refresh your Store Locator to see the update.