• Resolved NT1K

    (@nt1k)


    I’ve asked this before but I can’t seem to find the post (assuming your moving support to here). Everything reverted during the update and I should have saved the code elsewhere.

    But I was wondering how to color code the links in the sidebar widget to match the category colors on the calendar.

    Thanks again.

    http://ww.wp.xz.cn/extend/plugins/event-organiser/

Viewing 1 replies (of 1 total)
  • Yup – you might want to put this in a ‘utility plugin’ or you functions.php,

    add_action('wp_head','my_event_category_colours');
    function my_event_category_colours(){
    
        $categories = get_terms('event-category');
    
        echo '<style>';
        foreach( $categories as $cat ){
            if( !isset($cat->color) )
                continue;
    
            echo ".eo-event-cat-{$cat->slug} a{
                       color: {$cat->color}
                   }";
        }
        echo '</style>';
    }
Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Event Organiser] Widget/Sidebar: Color Coded Link’ is closed to new replies.