The Events Calendar Category Colors

Description

Add background colors to event categories displayed in the event views of The Events Calendar. This is inspired by the post Coloring Your Category Events.

Settings for The Events Calendar Category Colors plugin are located in their own tab on The Events Calendar Settings page.

To force a refresh of your CSS, add ?refresh_css to the end of your events URL.

Attribution

Thanks to jonahcoyote for some early help and direction.

Big thanks to Barry Hughes (WebsiteBakery) for refactoring code and Legend Superpowers.

Translations courtesy of:

Screenshots

  • The Events Calendar Category Colors Settings tab
  • The Events Calendar Category Colors in action
  • The Events Calendar Category Colors with Legend Superpowers in action

FAQ

Does the plugin require The Events Calendar plugin?

Yes. The Events Calendar plugin is written by Modern Tribe, Inc. It requires at least The Events Calendar v3.0.

What if I use a version of The Events Calendar 2.x?

The last compatible version of this plugin that works with TEC 2.x is The Events Calendar Category Colors v1.6.3.

Where can I get more help?

There is more extensive documentation of the plugins features and usage on the The Events Calendar Category Colors wiki.

Where can I report bugs?
  1. Add a new topic on the WordPress Support Forum.
  2. Add a new issue on the github repo.

Reviews

May 27, 2019
Excellent missing piece to The Events Calendar. Thank you so much!
April 19, 2019
TECCC is a must have for TEC if you have many different event categories. It makes it easy to get a overview over events depending on category. Also a great support, we had to do some overrides and with a little help from the devs in the forum, we managed to solve the last issues
January 25, 2019
I'm so impressed with this plugin! I had a minor issue and it was on my end. Support fixed the issue by resetting the cache and within minutes the problem disappeared. Oh and the plugin has nice features to make your calendar look great!
November 8, 2018
TEC does not include the ability to color event categories. The Events Calendar Category Colors add-on to the rescue! The plugin works as advertised and is a must-have for TEC users. Good support too. I gave 4 instead of 5 stars so Andy would have something to work toward 😉 It would be nice to support standard color names (instead of Hex only) and provide some preset styles to category legends....and then charge for the add-on/plugin.
October 12, 2018
I needed a straightforward way to color-code categories, and was directed to this plugin. After installation, there was a slight hiccup in how the colors displayed in the list view (specific to the theme I'm using). I found a similar thread in the forums, posted a note there, and I was pleasantly surprised to hear so quickly from Andy, and that he had a solution. Although I'm not a coder, I CAN copy/paste into the right place in the child theme functions.php file. 🙂 Andy hunted down this specific issue with the theme/merged stylesheet, and gave me code to solve it! It's really impressive to get such a quick response and a custom fix from a Developer. Paul
Read all 49 reviews

Contributors & Developers

“The Events Calendar Category Colors” is open source software. The following people have contributed to this plugin.

Contributors

“The Events Calendar Category Colors” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “The Events Calendar Category Colors” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

6.3.2 / 2019-10-30

  • fixed storage of cache_key transient

6.3.1 / 2019-10-24

  • fixed incorrect CSS selector for background colors

6.3.0 / 2019-10-04

  • structural reorganization of plugin
  • update WordPress and PHP requirements to align with The Events Calendar
  • remove GLOB_BRACE as unneeded and limiting #108, thanks @DakuTree

6.2.0

  • add filter to set options hash, hopefully this solves an issue with load balancers not having current files
  • change wp_get_updload_dir() to wp_upload_dir() so that if the directory doesn’t exist it is created
  • the above fixes Writing to CSS file failing, thanks @dpegasusm

6.1.1 / 2019-03-09

  • fix PHP notice #102
  • updated composer.json
  • update message incompatible PHP version for consistency with WP core

6.0.0 / 2018-10-20

  • move teccc_get_terms filter after filters teccc_add_terms and teccc_delete_terms
  • add default values when using teccc_add_terms filter
  • added class Bootstrap for plugin loading, now requires PHP 5.4+
  • use sanitize_hex_color() for validation of color picker data
  • fixed coloring for featured events

5.3.0 / 2018-08-03

  • fixed widget CSS
  • move list CSS to class Extras
  • fixed week CSS
  • load stylesheet all the time, more efficient as external file
  • updated class Main to use Tribe__Events__Main can now use Tribe__Events__Main::TAXONOMY
  • refactor setup of ignored terms and term data
  • add border-right to featured events
  • updated validation code upon saving options
  • use wp_upload_url() to for stylesheet to accomodate user directory preferences
  • set SSL corrected URLs for wp_upload_url(), https://core.trac.wordpress.org/ticket/25449

5.2.2 / 2018-07-28

  • fix to create CSS when files don’t exist

5.2.1 / 2018-7-28

  • cleanup old CSS files

5.2.0 / 2018-07-28

  • write standard and minified CSS to files
  • load minified CSS when WP_DEBUG is false
  • improve minify code
  • update CSS selectors for list view
  • refactor CSS strings for inline format

5.1.0

  • update for new tooltip title as h3
  • added some functions for adding deprecated CSS
  • added function Extras::override_customizer() for when Customizer settings need to be overridden

5.0.1

  • needed a space between CSS parameters, PhpStorm reformat code error

5.0.0

  • add Default as text color option which removes CSS color tag
  • Settings will need to be re-saved due to the new settings options

See CHANGES.md for complete list of changes.