Certain will. Let’s suppose we want to link to a category page – and, if present, we want ‘tipps’ to be used. (We’ll also link to the category page, but filter by events starting that are ‘running’ that day using the ondate
parameter)
add_filter('eventorganiser_widget_calendar_date_link', 'tunixtunix_link_to_event_cat',10,3);
function amen_link_straight_to_event( $link, $date, $events ){
//Note $date is a datetime object corresponding to a day in the widget calendar
//Sanity check
if( !$events )
return $link;
//Let's get all the event terms:
$event_cats = array();
foreach( $events as $event ){
$terms = get_the_terms( $event->ID, 'event-category' );
if( $terms)
$events_cats += $terms;
}
//If not event categories, abort
if( !$event_cats )
return $link;
//Extract the term slugs
$event_slugs = wp_list_pluck( $event_cats, 'term' );
if( in_array('tipps', $event_slug ) ){
$slug = 'tipps';
}else{
//Tipps not present, just pick another category
$slug = array_pop( $event_slugs )
}
//Get link to that category, and append 'ondate'
$link = add_query_arg('ondate',$date->format('Y-m-d', get_term_link( $slug, 'event-category' );
return $link;
}
**Note:** This is not tested, but should work in principle. It will only work for **1.6** or above which is currently in beta. I’m not plaining on releasing this until after WP 3.5 (which is due to be out 5th December). You can expect it shortly after – but I’d like to do some more bug tests ??