• Resolved mattmerendo

    (@mattmerendo)


    Local site development only at the moment.

    Great plugin! Currently we’re using event categories to mimic multiple calendars. So, for instance:

    1. Animals
    1.a Cats
    1.b Dogs
    1.c Rabbits

    2. Plants
    2.a Trees
    2.b Bushes

    Currently, if I show the legend on the plant calendar, it shows ALL categories, even cats and dogs and rabbits. Is there any way to remove the ones that belong to a different parent?

    • This topic was modified 5 years, 9 months ago by mattmerendo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andy Fragen

    (@afragen)

    Can you share the calendar URL so I can see what you’re referring to?

    Thread Starter mattmerendo

    (@mattmerendo)

    Unfortunately, I can’t show you the site, since it’s just a local site at the moment.

    Basically, I’m using the [tribes_events] shortcode to show a specific category — let’s say “Animals.” That category has several child categories — Cat, Dog, Horse, etc. All of those child categories show on the calendar page, and their color appears as expected in the legend. All that is great and perfect and amazing.

    The problem comes, though, because I also have another category — Plants — with children (Tree, Bush, Shrub) and all of those categories appear too!

    So in the legend on the page that shows just the Animals, I have a legend that has all the children animals (cat, dog, horse, etc.) as well as the children plants (bush, shrub, tree)… AS WELL AS the two parent categories, Animals and Plants. I want ONLY the children animals to show.

    Where in the code is the legend actually built? I could tweak it, perhaps, to add a class to each label that I can then use to display: none it in the CSS.

    Plugin Author Andy Fragen

    (@afragen)

    This plugin doesn’t manage which categories are displayed, only the category colors. I think you will need to as this in the forum for The Events Calendar.

    The legend is built in views/legend.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide categories in legend based on parent category’ is closed to new replies.