Forums Forums Search & Filter Pro How to display current queried category/taxonomy's name

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #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
    #212706

    If 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.

    Anonymous
    #212777

    Excellent this is what i was looking for. The Single Field by Field Name was exactly what i needed. Thank you!

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