Code Reference: How to Show Multiple Legends On a Page
-
I had originally used
teccc_reposition_legend('tribe_events_before_the_title');
to move the legend so it’s shown above the calendar title. I then wanted it to be shown below the calendar as well, but it would simply move it again so the previous position wasn’t shown anymore.I ended up using the following to have the legend shown above the calendar title as well as below the calendar itself:
// Change position of The Events Calendar's Color Category Legend (also, add an additional legend to the template) function show_teccc_legend(){ return Fragen\Category_Colors\Main::instance()->public->show_legend(); } if ( class_exists( '\\Fragen\\Category_Colors\\Main' ) ) { teccc_reposition_legend('tribe_events_before_the_title'); add_action('tribe_events_before_footer','show_teccc_legend'); }
I figured it might be helpful to share this code snippet for others. Also, this might be something worth adding to the GitHub wiki.
Thanks for the great plugin!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Code Reference: How to Show Multiple Legends On a Page’ is closed to new replies.