Forums › Forums › Search & Filter Pro › Can't get results to filter
- This topic has 15 replies, 2 voices, and was last updated 6 years, 8 months ago by Trevor.
-
Anonymous(Private) March 16, 2018 at 2:58 pm #166468
Ah I see – it says it on the display results tab – This should be the Full URL to a page/post where your results can be found – must contain the shortcode.
Perhaps I’m putting the code in the wrong place – I put all of the code contained in the producer-list div inside the code you posted.
Anonymous(Private) March 16, 2018 at 4:44 pm #166489Ok, I’ve sussed out where to put the code from post #166438, so that issue is all sorted and not to worry about the shortcode being included in the URL, I guess I don’t need to do that as I’m not using the shortcode option.
So, back to these queries:
It still shows all of the taxonomy terms rather than just showing the ones relevant to the search results, it there a way to only show the taxonomy terms that have filtered results in?Also, at the top of the page, just above the search form I need it to show the current filter that is active and be able to clear the filters by clicking on CLEAR ALL – I did have a look through the forums so I believe this is possible, but I didn’t really understand now to implement this.
Anonymous(Private) March 19, 2018 at 1:06 pm #166832Yes, I thought that, except I was trying to do it with PHP last week, I’ve just tried with javascript to no avail.
What about this – can you point me in the right direction please?
Also, at the top of the page, just above the search form I need it to show the current filter that is active and be able to clear the filters by clicking on CLEAR ALL – I did have a look through the forums so I believe this is possible, but I didn’t really understand now to implement this.Trevor(Private) March 19, 2018 at 1:33 pm #166839For both questions, I am not skilled enough to do this, and this level of customization is not covered by support. You would need to use a third party freelance coder.
With some custom coding, displaying the current filters is possible, but it is not easy. We plan to make it a feature of V3 (in development). But clearing them singly is not so easy. To clear them all (to reset the form), you would need to have a button that calls the form reset. That is possible. See this (and the post it refers to):
This documentation may be what you are looking for (note, if you are using Ajax to refresh the page, any such output of the query needs to be inside the Ajax container):
https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/
There are many snippets also on this forum. Try this search:
https://support.searchandfilter.com/forums/search/current_query/
You need to fetch the values from the taxonomy form fields. Be aware that some search terms will be held as arrays, and not single strings/values.
-
AuthorPosts