Forums Forums Search & Filter Pro Dynamic Filtering, and same URL of results

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #81399

    I have a custom post type with multiple taxonomies, and within this multiple terms (categories). I have created a template which the user is directed to no matter what the taxonomy or term is and WordPress gets the required information using the get_query_var.

    For example, http://www.mysite.com/product/coats/warm or http://www.mysite.com/product/trousers would both get sent to the same page template and return the correct set of products.

    Is it possible to use one filter on this template and dynamically pass which taxonomy and/or term the user is on so those filter inputs are pre-set?

    Also, the plugin currently changes the URL of the results page once a search has taken place. Is it possible to ensure that the ajax callback returns results to the same place i.e. http://www.mysite.com/products/coats/warm?

    Cheers

    Trevor
    #81409

    It rather depends on your setup as to how much of what you want can be done. Is this a WooCommerce filter? And if so, are you using the WooCommerce display method? This method works from the shop page, so it will always revert back to that page. We may well make changes to this for the next major release, but that will be many months away yet.

    The filter can auto detect categories (there are settings for this), but the category also needs to be in the search form itself.

    Anonymous
    #81422

    It is not WooCommerce, it is built on top of the WordPress custom post types and taxonomies. Is there any way that the taxonomy/term can be passed dynamically? Either through an action or hook?

    Cheers

    Trevor
    #81571

    At this time it has to be passed as part of the query string. We are working on the next major version of Search & Filter, and I believe this functionality that you require will be part of that. it will, however, be many months, as it is a big project.

    Trevor
    #81804

    Hi

    Maybe this might be possible. I is possible to use a filter to modify the URL:

    https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Modify_URLs

    Also, you can either use the detect defaults settings in the form setup, or use the edit fields filter (filter input object):

    https://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Filter_Input_Object

    Let me know if, having looked at these, any might be what you want?

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