Forums Forums Search & Filter Pro Searching Taxonomy Archives – results show on a different page

Viewing 10 posts - 1 through 10 (of 28 total)
  • Anonymous
    #270151

    Hi
    I have a taxonomy archive here:
    https://www.truckpages.co.uk/trucks/sale-type/auction/

    If I search for a ‘Light Commercial Vehicle’ under the ‘vehicle types’ it result are shown on (one of) my search results pages. https://www.truckpages.co.uk/trucks-for-sale/?_sft_types=vans&_sft_sale-type=auction&_sfm_ca-year=1980+2020&_sfm_gross-weight=0+150000&_sfm_mileage=0+1500000&_sfm_horsepower=0+800

    I have different search results pages/templates for different ‘vehicle types’ as they do not all use the same filtering criteria. These are all filtered in the S&F set up by adding the types to the taxonomy filters

    For example, a trailer can never have a BHP and so would never show in any search as the slider will dump it into the URL and omit anything that does not have a bhp – therefore no trailers. On the trailer page this does not happen as there is no horsepower field.

    What I believe I need is for the user to stay on whatever taxonomy archive page he was on when carrying out the search, rather than being sent to one of the ‘specialist’ search results pages?

    I have not got the box ticked that says: If the user is not on the results page already, the first submit of the Search Form will cause a page redirect

    Could it be that the URL for the main post type archive was also /trucks-for-sale/ ? (it is not any more it is /listings/

    Thanks for your help in advance

    Jason

    Trevor
    #270186
    This reply has been marked as private.
    Anonymous
    #270189
    This reply has been marked as private.
    Trevor
    #270265
    This reply has been marked as private.
    Anonymous
    #270275
    This reply has been marked as private.
    Trevor
    #270280
    This reply has been marked as private.
    Anonymous
    #270339
    This reply has been marked as private.
    Trevor
    #270461

    You are correct, try it on the live site first. On the site where it does not work, if I am reading your reply correctly, it depends how the field is set as to whether it works or not, and that this happens only after a number of fields are added. It might be an issue with the PHP variable max_input_vars (the PHP installation default for that variable is 1000, which is rarely anywhere near enough for WordPress).

    So, that would be something I would check. The setting can be seen in WordPress admin, here:

    https://www.screencast.com/t/pDBy7oDB

    Anonymous
    #270515

    Hi

    I have changed the setting to 2500

    Not sure I am making progress here. In trying to experiment in the dev site I have encountered different issues to those I experience on the live site.

    Perhaps I should try a new avenue?

    Two issues on live site:
    1. The search results will not be displayed on the archive page the form is on
    2. When redirecting it goes to /trucks-for-sale/ rather than a page I determine that does not have the taxonomy filters set in the results

    If I could either
    1. stop the redirect
    2. specify a page for the generic search to land on

    Then It would work OK

    Background to the above

    When the redirect happens on the live site and it goes to the /trucks-for-sale/ page, this is because this is the name of the ‘post type’ slug and therefore the default post archive page.

    I know this because I removed the redirect from ‘listings’ as the CPT slug on the dev site and the search form now redirects to /listings/ when it gets stuck.

    Thanks

    Jason

    Trevor
    #270525

    If the generic search is NOT on the results page, and always re-directs to that results page, then set its Display Results Method to ‘Custom’, switch Ajax OFF, and specify the page URL for it to land on.

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