It’s really much better and simpler to just install the plugin as a plugin.
I’m not quite clear on what you mean by sorting. Can you provide a couple of links?
I have the plugin installed, but it only shows the legend on calendar view, unless I’m missing something. That’s why I added the code to functions.php to make it show on list view. Here it is https://www.staging4.kelarpacific.com/events/
I find that if you click next events twice, then the sorting happens. By sorting I mean that when you click a category from the legend, the list should highlight events from that category.
If you uncheck the setting to use your own legend CSS you will be better able to see the legend.
Legend is present in both views.
Legend Superpowers only works in month view. Clicking once will reduce opacity of all events except the one clicked. Clicking again returns to full opacity, if the same event was clicked.
Hmm I removed the code I added (https://github.com/afragen/category-colors-options/blob/master/category-colors-options.php), and the “use your own legend CSS” box was unchecked. Now the legend only shows in calendar view, as you can see here https://www.staging4.kelarpacific.com/events/
When I added the code mentioned above, it displayed the legend in list view, but the legend categories didn’t always respond. After I would click “next events” twice and then click on a legend category, the list view would refresh to only show events from that category, which is the result I’m looking for. I guess what I’m saying that without adding code I only see the legend in calendar view, but when I add code to see legend in the list view, it is buggy.
Can you share a screenshot of your Category Colors settings?
So here’s what I see.
You have hidden all categories except, sd-training and webinar. Those categories have no styling associated with them except for bold font weight. I don’t see the settings for la-training but I assume they are similar.
What are you wanting to display?
Additionally you have inline rules overriding legend elements.
Sorry, I’m really bad at explaining.
So the legend from the calendar view, https://ibb.co/W0513jJ , I want to appear here https://ibb.co/MDV4Yd7 .
When I add the snippet from your github, the legend appears the way I want
https://ibb.co/CwDCq88 . However, the category selectors don’t work until I click next events twice. Then when I click on a category, SD-events in this case, it sorts accordingly https://ibb.co/kmLmVxx
So legend superpowers doesn’t work in the list view. Uncheck that from the Settings.