Forums › Forums › Search & Filter Pro › Dynamic Filtering, and same URL of results
- This topic has 4 replies, 2 voices, and was last updated 9 years, 3 months ago by
Trevor.
-
Anonymous(Private) January 11, 2017 at 5:02 pm #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(Private) January 11, 2017 at 5:13 pm #81409It 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.
Trevor(Private) January 12, 2017 at 9:51 am #81571At 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(Private) January 12, 2017 at 4:25 pm #81804Hi
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):
Let me know if, having looked at these, any might be what you want?
-
AuthorPosts