Writing a function to replace sidebars on single event categories

I am using the custom sidebar plugin but one issue I am having is that it doesn’t populate event categories from the Events Calendar (Modern Tribe) plugin. Because of this, you can replace the sidebar on each individual event but the event category archive page cannot be changed.

Is there a simple function that can check and replace the sidebar for an event category archive page and all the events within that category?

Thank You.