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

Presetting search options via a custom URL

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Presetting search options via a custom URL

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41204
    ISCISC
    Participant

    Hi, I’m having an issue with presetting the custom post type filter using a custom URL. I followed the steps on this page.

    I have two search instances. One instance is on a normal page and one on the search page via shortcode on the search.php template.

    From the instance on the normal page I’m redirecting to the search page and trying to preset the Post Types Filter.
    Using this as the redirect url I get from following the steps from the Presetting search options via a custom URL page:
    /?s={phrase}&customset[]=podcast&p_asid=8&p_asp_data=1&customset[]=podcast&filters_initial=1&filters_changed=1&qtranslate_lang=0&current_page_id=28019&asp_s=&asp_id=8

    After the search page loads the URL parameters get overwritten and all of the post types get selected instead of just the one I’m trying to set in the URL parameter.
    Is there a parameter or setting I’m missing?

    #41211
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    With the latest versions installed, the search state can be automatically pushed to the browser address bar, so you don’t neccessarily need to use that tutorial – it is sufficient to set the search settings as you want them, and copy the URL after the search is finished: https://i.imgur.com/IXCwNuV.png

    It is much more accurate and simpler too. The correct URL for this specific case is going to be:
    /?s=&customset[]=podcast&p_asid=8&p_asp_data=1&customset[]=podcast&filters_initial=1&filters_changed=0&qtranslate_lang=0&current_page_id=28033&asp_s=

    #41218
    ISCISC
    Participant

    Fantastic! Thank you!

    #41220
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #41221
    ISCISC
    Participant

    You cannot access this content.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Presetting search options via a custom URL’ is closed to new replies.