Custom URL not work with result

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Custom URL not work with result

This topic contains 9 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #12469
    ilanb
    ilanb
    Participant

    How open custom url when click on search result:
    please see screenshot:
    https://screencast.com/t/UQf05SGwp

    Thanks

    #12484
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Changing the URL on the results is only possible with a custom filter code for safety reasons. For example, you can access and change the URLs to anything by placing the following code to the functions.php file in your active theme directory:

    In this example, all result URLs will be changed to ‘http://my-custom.url’. You can change that to anything you want.

    Best,
    Ernest Marcinko

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


    #12487
    ilanb
    ilanb
    Participant
    You cannot access this content.
    #12492
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Please note that this classifies as a customization request, so I can’t guarantee that my suggestions will work in any case.
    I would probably make it into a function, and use it something like this, together with the filter:

    I have not tested this, I just put together based on your code. Basically you will have to change lines 35 and 38 to return the URLs you need.

    Best,
    Ernest Marcinko

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


    #12493
    ilanb
    ilanb
    Participant
    You cannot access this content.
    #12501
    Ernest Marcinko
    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 :)


    #12503
    ilanb
    ilanb
    Participant

    Hi Ernest,

    Finaly after some tweek setting all works fine 🙂

    Thanks a lot, great product and awnsome support !!

    #12508
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #12509
    ilanb
    ilanb
    Participant

    Hi Ernest,

    Rate done ! 🙂

    Thanks again great support !

    #12510
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Custom URL not work with result’ is closed to new replies.