This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: How can I use GET parameters to preselect filters on search page?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How can I use GET parameters to preselect filters on search page? Reply To: How can I use GET parameters to preselect filters on search page?

#20609
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

It might be actually possible, but it takes some time to get it right. The GET values are encoded into a single variable though, that needs to be copied. To make this work, please follow this guide:

1. Temporarily, on the General Options -> Logic & Behavior panel, change the redirection options as following: https://i.imgur.com/FtD4ACy.png

This will enable redirection to the /seach/ page with the filter states, whenever the magnifier button is clicked.

2. On the search page, change some of the filters, and then hit the magnifier icon, that will reload to the same page, but the URL will contain some other encrypted information, and the filters are selected as before: https://i.imgur.com/rCfgGEd.png

3. If you copy this URL and open in a new browser tab for testing, the search will open with the previously selected filters. Basically you can use this URL now to add to menus, or anywhere else, and it will redirect to the search page with the pre-selected filter states.

4. Repeat steps 2-3 to generate as many URLs with the filter states as you need.

5. Don’t forget to change back the options from step 1.

That’s it, this should do the trick 🙂