Forums › Forums › Search & Filter Pro › How to display current queried category/taxonomy's name
- This topic has 2 replies, 2 voices, and was last updated 5 years, 5 months ago by Anonymous.
-
Anonymous(Private) May 28, 2019 at 10:26 pm #212671
Is there a way to display the current queried taxonomy’s “Title”. For example, if i filter by taxonomy category A, I’d like to display taxonomy category A’s Name and all associated items below in the search results window.
Thanks in advance for any help!
Trevor(Private) May 29, 2019 at 10:12 am #212706If I understand you correctly, you need to output the currently searched for term(s) on the results page. To an extent, this is limited by how the page is constructed, but as long as you have a PHP template and know how to edit/code that, you should be able to achieve what you want.
To show the filters, as I said, this requires custom coding when using the current version of Search & Filter Pro. You can access the filter terms though, but would need further PHP work to display them. To fetch the search terms, the https://searchandfilter.com/documentation/accessing-search-data/ guide is basic but you can extend the idea to grab lots of other data. If you have other filters, then it becomes a little more complex, but I can give you links. This thread might help you:
https://support.searchandfilter.com/forums/topic/accessing-field-slug-on-search-results/
… and this search will give similar threads I think:
https://support.searchandfilter.com/forums/search/sf_current_query+get_array+field+%5Bvalue%5D/
Note, if you are using Ajax refreshing of the results, any PHP needs to be inside the Ajax Container, or it will not update.
-
AuthorPosts