• 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" />
    </li>

    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/.

    Thanks!
    Donna

    http://wordpress.org/plugins/the-events-calendar-category-colors/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andy Fragen

    (@afragen)

    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.

    Thread Starter Donna McMaster

    (@mcdonna)

    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. 🙂

    Donna

    Plugin Author Andy Fragen

    (@afragen)

    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.

    Thread Starter Donna McMaster

    (@mcdonna)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to add a "show all categories" option to the legend?’ is closed to new replies.