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

    (@afragen)

    You may use the teccc_legend_terms filter as documented in the src/views/legend.php file to return an ordered list of terms/categories. https://github.com/the-events-calendar/the-events-calendar-category-colors/blob/7229976135aa84c13b8f946715968d03c62eae74/src/views/legend.php#L22

    Thread Starter bluephoric75

    (@bluephoric75)

    Thanks for the quick reply Andy. 2 questions:

    1. When using the?teccc_legend_terms?filter?, how is the order then determined?
    2. 2) Where can I find the legend.php file?
    Plugin Author Andy Fragen

    (@afragen)

    The above link shows where the file is.

    You would code the order you want returned from the filter.

    Thread Starter bluephoric75

    (@bluephoric75)

    Found it, thanks.

    Could you explain how this works please? > You would code the order you want returned from the filter.

    Plugin Author Andy Fragen

    (@afragen)

    The filter returns an array of terms. You would code the order of the array in your filter’s callback function and return that newly ordered array. The remaining code would use this as the order for the legend.

    Thread Starter bluephoric75

    (@bluephoric75)

    I’m not a dev so I can’t follow that explanation. The order I’d need would be as follows:

    1) Ages 6-17, 2) Kids, 3) Tweens, 4) Teens, 5) Young Adults, 6) Adults, 7) Families

    Could you please provide the necessary code for the order of the array based on the above order?

    It would be much appreciated.

    Plugin Author Andy Fragen

    (@afragen)

    The easiest way might be to fiddle with the category slugs to prefix with numbers and ensure the category name is how you want to display.

    I’m sorry but I am unable to provide custom code in here as it would require much more information and regrettably I don’t have the bandwidth.

    Thread Starter bluephoric75

    (@bluephoric75)

    Understood. Thanks for the info Andy.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.