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

Search parameter passed by url Get

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search parameter passed by url Get

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #10693
    achillonachillon
    Participant

    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 location

    #10695
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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.

    #10700
    achillonachillon
    Participant

    OK, 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?

    http://www.kohsamuiholidays.com/search?location=Maenam

    #10701
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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.

    #10719
    achillonachillon
    Participant

    You cannot access this content.

    #10721
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    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:

    #10752
    achillonachillon
    Participant

    That is amazing!
    Thank you so much for all your help, your time and effort!
    Have an awesome week!
    Alberto

    #10763
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Search parameter passed by url Get’ is closed to new replies.