Top

Display Default Search when Store Locator Loads

To display a default search when Store Locator loads, follow these steps:

  1. From "Shopify Admin", select Apps.

    select apps

  2. Select Store Locator.

    select store locator

  3. Select Settings.

    select settings

  4. Select Display Settings.

    select display settings

  5. Copy and paste this code in the "Page Header HTML" field: 
    <script>
    $( document ).ready(function() {
    $('#address_search').val('!!!!');
    
    setTimeout(
    function() 
    {
    $('.search_bar button').click();
    }, 1000);
    
    });
    </script>

    paste the code

  6. Replace !!!! with the search term you'd like as the default search.

    replace !!!! with the search term 

  7. Select Save.

    Select Save

That's it!