Support » Fixing WordPress » Is there a way to only show categories that are used on the current archive?

  • This is kind of a tricky one. It’s hard to even explain. Basically what I’m trying to achieve is this:

    I have a custom post type, set up as products. On the products page, I’m using Quicksand.

    Because there are so many products and product categories, I am using Quicksand as a filter system.

    So, I have 3 different taxonomies set up for the products.

    The first is the product category, for example – desks, chairs and so on.

    The second taxonomy is really the sub category, so if you’re in chairs you would have – executive seating, visitors chairs etc.

    The third taxonomy is product manufacturers and brands.

    The reason I have three different taxonomies set up this way is because by doing this, I can have 3 different UL’s spitting out their categories as filters for Quicksand. If you look at the Quicksand example, image where it says “Filter by type” it says “Filter by category” (showing Executive Chairs, Visitor Chairs etc) and where it says “Sory by” I have the manufacturer list.

    The problem I’m having is this – all the categories are showing on all the products, even the ones that don’t apply to them. For example, I have manufacturers or desks being listed on the chairs page. I basically need it to just list out the categories that apply to the page that the user is currently on. I’ve found a way to do it using CSS, but it’s not really ideal because if the client needs to add new categories in the future I’ll have to edit the css.

    Below is what I have so far.

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Any help or advice would be greatly appreciated.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Is there a way to only show categories that are used on the current archive?’ is closed to new replies.