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

Custom URL not work with result

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

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

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

    Thanks

    #12484
    Ernest MarcinkoErnest 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.

    #12487
    ilanbilanb
    Participant

    You cannot access this content.

    #12492
    Ernest MarcinkoErnest 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.

    #12493
    ilanbilanb
    Participant

    You cannot access this content.

    #12501
    Ernest MarcinkoErnest 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.

    #12503
    ilanbilanb
    Participant

    Hi Ernest,

    Finaly after some tweek setting all works fine 🙂

    Thanks a lot, great product and awnsome support !!

    #12508
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #12509
    ilanbilanb
    Participant

    Hi Ernest,

    Rate done ! 🙂

    Thanks again great support !

    #12510
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Custom URL not work with result’ is closed to new replies.