Hi, I made a view where the user can filter products (furniture items) based on their placement (living room, bedroom, bathroom, etc.). Would it be possible to print, above the filtered items, a custom text based on the active filter? (See attached image)
Can you suggest a way to achieve this?
I think that if it were possible to print the slug of the active filter as a class (in a custom div inside the view but before the loop) this could be achieved quite easily.
Hi Minesh,
thank you for your reply. I am using the classic archive, I was using also Ajax (the option "AJAX results update when visitors change any filter values"). At the moment instead of Ajax I tried the option "Let me choose individual settings manually" selecting "Update the View results every time an input changes" and, more importantly, "Update URLs after loading search results". This way I have available the URL params which can be used as class for my tags:
This is working, anyway if you have a better suggestion please let me know. I would prefer to have clean URLs without parameters but if there is no alternative that is fine too.
That is why I asked you those question and that is the only possible solution that we need to catch the value of taxonomy term slug using the URL param which you already did it.