I looked for a very long time to find a tag filter system, but I couldn’t find one, so this is what I came up with for my page:
I used the plugin, Category Page which can be found at:
It lets you connect pages to your category archive pages, showing them as a header. So, whatever you put in the connected page will show up as a header every time you click the category it has been connected to. The beauty of this is that you can have a separate header for each category that you have.
Using that plugin, I connected an unpublished (so it wont show up on the title bar) page to each of my categories, which on my website, are the provinces of Canada. For the Category Page plugin to work properly, you have to publish the linked page when doing the connection. You can then switch it to unpublished right after, though.
Each of the connected pages has a set of Icons with links that look something like:
For each category, you have to switch the second tag in the link to match the category it will be searching within.
So on my website, when you click a category (Province), it shows all of the companies in my directory from that province, but when you click on the buttons in the category page header, it essentially does a double tag search (Province + Industry).
You just have to make sure you tag all of your posts with both the Category name and your refined search parameter. In my case, I tag every post by Province, which is also the category I file it under, and by the Industry.
I was wondering if anyone has come up with a better and more efficient solution for tag filtering? My method works alright, but could get quite annoying if you have a ton of tags or are constantly adding more.
- The topic ‘The best solution I could come up with for tag filtering’ is closed to new replies.