Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search parameter passed by url Get
This topic contains 7 replies, has 2 voices, and was last updated by Ernest Marcinko 7 years, 9 months ago.
- AuthorPosts
- November 3, 2016 at 10:05 am #10693
I need to be able to make a search passing the location in the url,
so if I go to
http://www.kohsamuiholidays.com/search?location=Maenam (for instance)
it’ll show the same as if I go to
http://www.kohsamuiholidays.com/search
and choose “Maenam” as locationNovember 3, 2016 at 10:36 am #10695Hi,
While it is not possible to trigger via URL, there might be a solution. Try putting this custom code to the functions.php file in your active theme directory:
This will detect the “location” parameter and change the location value of the search select on load.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 3, 2016 at 11:36 am #10700OK, thanks a lot
It does load in a weird way though, please have a look and the search does not work anymore, any easy way to fix this, please?
November 3, 2016 at 11:40 am #10701Hi,
I don’t know, I will have to be able to make changes to the code directly to see if it is possible.
If you have a temporary FTP details to your test environment, feel free to update your ticket, and I will take a look.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 4, 2016 at 7:47 am #10719You cannot access this content.November 4, 2016 at 10:13 am #10721Hi!
Thank you for the details, I was able to find a solution. I’ve changed the function.php file on your server accordingly.
For future reference, this is the working code:
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
November 7, 2016 at 3:52 am #10752That is amazing!
Thank you so much for all your help, your time and effort!
Have an awesome week!
AlbertoNovember 7, 2016 at 3:08 pm #10763You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘Search parameter passed by url Get’ is closed to new replies.