I am currently developing a site where I can filter the content with different tags / categories. Everything is working fine. The only thing left to add now is a “Reset Filter” option.
Of course I could just add “Reset Filter” as standard option and link back to the main site, but that’s not beautiful.
A button that reads “x NameOfTag” (the “x” stands for the close-icon) instead of “Reset Filter” feels more elegant and I want it to be shown only when a tag is applied.
As I am more of a frontend guy with zero PHP knowledge I don’t succeed in building the if condition.
Thanks in advance for helping out.
Have a nice day.
Best, Christian.