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.
Requires PHP 5.3 or greater.
Thanks to jonahcoyote for some early help and direction.
Big thanks to Barry Hughes (WebsiteBakery) for refactoring code and Legend Superpowers.
Translations courtesy of:
- Installation Instructions
- Upload the entire
/the-events-calendar-category-colors/folder to the
- Activate the plugin.
- Go to the Category Colors tab of The Event Calendar Settings page.
- Upload the entire
- 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?
Andy Fragen has done an amazing job with this free plugin for The Events Calendar. Very easy to set up and manipulate. If it were possible, I’d give this a sixth star because of the incredibly helpful troubleshooting and support that Andy provides on the forum and GitHub.
just what I want.
needed a little tweaking to get just right with my avada theme – andy worked it out and upgraded the plugin and it’s working perfect now. awesome job and awesome plugin! thanks!
This is a GREAT plugin. Simple to setup. Simple to use. Did exactly what I wanted it to do. Thank you very much!!!
This plug really “classes up” the calendar.
Works great, and Andy’s support is perfect! Highly reccomended
Contributors & Developers
“The Events Calendar Category Colors” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- fixed ECP week view
- added support for ECP week view shortcode
- make Autoloader a drop-in
- move graceful exit to just before plugin initialization
- added support for tribe shortcodes
- graceful failure if The Events Calendar is not active
- added CSS selector to override Customizer month view
- added filters and functions to provide WPML compatibility thanks @jvier for testing
- added our own PHP version check
- added filter
teccc_fix_category_background_colorfor those pesky themes that have Events Calendar specific CSS, I’m looking at you Avada
- moved older changes into CHANGES.md
- modified filter
teccc_fix_category_link_colorfor those really pesky themes. The modification will require an adjustment to the way the filter is called and returned. Refer to the wiki for details.
- above filter modification fixes issue with Read More links.
- added filter
teccc_fix_category_link_colorfor those pesky themes that override everything.
- fixed ETag header in CSS
- removed Filter Bar coloring
- further optimized CSS minification
- refactor mobile CSS and add filter
- fix superpowers to be more inclusive in find – thanks Lisa
- fix to display title full width, most noticeable in photo view
- sorry about all the quick updates, just trying to fix issues as I’m made aware of them.
- fix for mobile TEC 4.0
- fix week view all day color
- fix week view link color
- update for The Events Calendar 4.0
- fix for WordPress installation in subfolder – thanks @IndigoStarfish
- tested to WordPress 4.4
- escape all things for better security
- tweak declaration/initiation of variables
- tested to 4.3
- change CSS load order to ( PHP_MAX_INT – 100 ) to allow for overriding
- fix for PHP notice on Settings
- fix for v3.10 all day week view.
- update for
Tribe__Events__Filterbar__Viewwith CSS fix too.
- update for new
- fix CSS for week view
- add setting to show hidden categories – for @mending
- add setting to hide category on frontend
- fix a number of PHP notices
- fix for fatal error. Need to load namespaced class as variable as PHP < 5.3 chokes.
- quick fix for fatal error, I think due to naming method in WPUpdatePhp
- don’t use variable for class name
- switch PHP version check to use WPUpdatePhp
- don’t minify CSS when
?debug_css– this to help in debugging
requires PHP 5.3 or greater as requires namespacing
class aliases for backwards compatibility for users of ECP 3.9 or lower
- renamed directory and class names to allow for PSR 4 loading
- fix all text domain slugs and update POs
- add CSS selectors for TEC 3.10
See CHANGES.md for complete list of changes.