Category Colors filtering

Home Forums Calendar Products Events Calendar PRO Category Colors filtering

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1340477
    Greg Cole
    Participant

    We are using the Events Calendar Pro and shortcodes to display separate calendars – using a parent category, we then see all child-category events on the calendar views as expected. Using Category Colors plug-in with this to filter the results does not work as it shows all categories. We ‘hide’ the parent categories, but still all child categories are displayed.

    Is there a way to get the list of categories being used for the current view so we can try to filter the Category Colors (create a custom legend, etc.) using this information? If we were able to pull the category being used in the current view (the parent category ID/slug) we should be able to then pull a list of child-categories and output our own legend above the calendar.

    Any assistance greatly appreciated.

    #1340488
    Courtney
    Member

    Hi Greg

    https://wordpress.org/plugins/the-events-calendar-category-colors/ is a 3rd party plugin, so we can’t really do much for support on that. However, I’m wondering if you’ve tried a shortcode containing multiple categories as an option.

    Ex:

    [tribe_events view="list" categories="barbecue, chicken, lunch, summer"]

    Would that be an alternative for you?

    Thanks
    Courtney 🙂

    #1340525
    Greg Cole
    Participant

    Thank you – using multiple categories affects the view as needed, but that does not affect the display of the categories in the Category Colors add-on. While I understand you do not provide support for third-party plug-ins, I was simply telling you why I was seeking the information in hopes you had encountered a similar issue.

    What I need to know is if there is any utility/function to be able to pull the category/categories used in the shortcode for the current view?

    If I use [tribe_events category=”test”], is there any way for me to programmatically determine that the current view/page is using “test” as the category filter?

    #1340526
    Greg Cole
    Participant

    Hmmm… just tried a shortcode with multiple categories and it does not seem to work at all:

    [tribe_events categories=”bible-6, lang-arts-6, math-6, science-6, soc-studies-6, spanish-6″] returns all events.

    #1340544
    Greg Cole
    Participant

    I made a work-around by using ACF Pro taxonomy fields. I set the field to be shown on my individual calendar pages, and then selected the event categories I wanted to filter for on that page. Then, in the custom legend.php file I added to my child theme I used in_array to filter the categories displayed based on those items I had designated for that specific page.

    Not as clean as it could/should be, but t works.

    Cheers!

    #1340656
    Courtney
    Member

    Thanks for that update Greg. That is quite a workaround, but I’m thrilled you’ve got it working!

    Thanks
    Courtney 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Category Colors filtering’ is closed to new replies.