ical.php per category
function em_ical_slug( $args ){
global $wp;
$URL = explode('/', $wp->request );
/*
category / category name
sample URL: activiteit/categorie/commissieactiviteit/
*/
if ( is_array($URL) ){
$type = ( isset($URL[1]) ) ? $URL[1]:"";
if( $type == 'categorie' || $type == 'categories' ){
$args['category'] = $URL[2];
}
}
return $args;
}
add_filter('em_calendar_template_args','em_ical_slug',100,1);
Comments