Reply To: Custom URL not work with result

#12501

Ernest Marcinko
Keymaster

Hi!

I see what you did there, it indeed can be done with one search bar, I think. So, I've logged in and made a copy of the second search, and I configured it so a category drop-down box is displayed as well.

Now, I put together a javascript/php code snippet for you, which will check the chosen category, and manage the redirection based on that. This code will only work with that search instance. Basically, when the user hits enter or the magnifier icon, then this code is executed, and will check which category is selected, then redirect the page to that. You will have to copy it to the functions.php file in your theme directory, like the previous one:

It might have errors, so please make sure to check it, if you can 🙂 I hope this will work for you.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)