• Resolved nickbasham

    (@nickbasham)


    This is a follow-up to this thread from three years ago: https://www.ads-software.com/support/topic/can-i-pass-the-zip-code-using-url-parameters/

    I’ve successfully used the wpsl_search_input filter to add a “location” query string, which does populate the location search field as expected. However, the default search results are still displayed, and the user has to click the Search button to initiate a search on the passed-in location.

    Is there another filter or action that can be used to trigger the search on page load to use the query string instead of default values?

    Thanks for any help you can provide!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    There’s unfortunately no way to trigger the search to run automatically on page load, other then writing custom code that you load from a custom file that calls ‘trigger‘ on the submit button ID ( wpsl-search-btn ).

    Thread Starter nickbasham

    (@nickbasham)

    @tijmensmit Gotcha – should be simple enough to trigger that with a couple lines of JS, just wanted to make sure I wasn’t missing some built-in functionality. Thanks for the reply, I appreciate it!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search for location passed via query string on load’ is closed to new replies.