Forums

Filter Tagged Posts within a Certain Category (2 posts)

  1. id eric
    Member
    Posted 3 years ago #

    How would I show posts within a certain category, that have the same tag?

    For example, I have a category called "Celebrity". I then include tags on each item that describe the type of content, for example "Video". How would I show a list of all posts within the Celebrity category, that have the Video tag?

    I would like for it to display the same way it would when you click on the tag link itself, but I just want to filer it to show only posts within the same category.

  2. jbpisio
    Member
    Posted 3 years ago #

    I looked for a very long time to find a tag filter system similar to what you are describing, but I couldn't find one, so this is what I came up with for my page:

    sciemploy

    I used the plugin, Category Page which can be found at:

    Category Page

    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:

    http://sciemploy.ca/tag/environment+bc/
    http://sciemploy.ca/tag/engineering+bc/
    ...etc

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags