The Events Calendar Category Colors
[resolved] how to add a "show all categories" option to the legend? (5 posts)

  1. Donna McMaster
    Posted 2 years ago #

    I love your plugin! But my client couldn't figure out how to go back to seeing all categories after she clicked to see just one category. I have to admit, it's not obvious. I could add a line of instructions but that's clunky. She asked if I can add an "All Categories" option that would restore all.

    I found the filter so I can see it would be easy to add an extra list item. Here's an example of what's there now:

    <li class="tribe-events-category-holidays tribe-events-category-35">
      <a href="http://su.mcwebby.com/events/category/holidays">Holidays</a>
      <input type="hidden" value="holidays" />

    Can this be done? What values would I use in the additional list item? (Not to worry about CSS; I can do that.)

    You can see the development site (work in progress) at http://su.mcwebby.com/events/.



  2. Andy Fragen
    Plugin Author

    Posted 2 years ago #

    All the client has to do is click on the same category again. Click once on, click again back to normal. Click another category and that one is selected.

    The unintuitive way to return to all categories is to reload the page.

    The legend list is automatically generated so adding another item is just a matter of adding another category. Or am I misunderstanding.

    There's a filter in The Events Calendar that I use to add the legend

    add_action( 'tribe_events_after_header', 'return_all_categories' );
    function return_all_categories() {
        echo 'Click the category legend to hide/unhide a specific category';

    Place that in theme's functions.php file and it should put that text above or below the legend, not sure which.

    Site looks good. Remember to rate the plugin. ;-)

    Let me know if this solves your problem.

  3. Donna McMaster
    Posted 2 years ago #

    Thanks, Andy! I was hoping to add another box like the category boxes, but that says "All Categories" ... see the design doc:

    But if that's not doable, I'll just use a legend.

    Toddling off to rate the plugin. :)


  4. Andy Fragen
    Plugin Author

    Posted 2 years ago #

    You could add anything via the code sample above. But I don't think you'll be able to hook into the legend superpowers JavaScript. Probably easier to have a well crafted instruction line for those that don't understand.

  5. Donna McMaster
    Posted 2 years ago #

    Thanks, Andy, that answers my question. Much obliged.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar Category Colors
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic