Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Hierarchical Legend #83

Open
KZeni opened this issue Jul 25, 2017 · 3 comments
Open

Support Hierarchical Legend #83

KZeni opened this issue Jul 25, 2017 · 3 comments

Comments

@KZeni
Copy link

KZeni commented Jul 25, 2017

I made a custom legend.php file and added custom CSS to accommodate making the legend display the categories in a hierarchy rather than a flat list. It would be great if this were to be implemented as an option so that others could toggle between the default flat list and one that shows them in a basic hierarchy. As such I've included the legend.php file and custom CSS I came up with for you to use/reference for implementing it officially as an option or to simply share with others.

Here's a gist of all of the additions to accommodate this: https://gist.github.com/KZeni/05b8e0069ab60924267bd32b2343c615

I have also posted about this on the WP.org forum at https://wordpress.org/support/topic/proposed-code-reference-support-hierarchical-category-legend/

@afragen
Copy link
Collaborator

afragen commented Jul 26, 2017

You can put this in a template override so it stays between updates. I'm not trying to create all options. I just wanted something basic that the most people can benefit from. I'll leave this open so people see it. Thanks.

https://github.com/afragen/the-events-calendar-category-colors/wiki/Setting-up-template-overrides

@KZeni
Copy link
Author

KZeni commented Jul 31, 2017

Just an aside, I have updated my provided legend.php template code to also account for hidden category labels as well as the setting which shows hidden category labels.

@afragen
Copy link
Collaborator

afragen commented Jul 31, 2017

@KZeni you should really put these files in a repo or gist for easier reference.

Any way to add that CSS using the teccc_add_legend_css hook? https://github.com/afragen/the-events-calendar-category-colors/wiki/Filters-and-Hooks#teccc_add_legend_css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants