eventsmanager icon

ical.php per category

eventsmanager | PRO | 04/21/24 07:02:24 AM UTC (Edited) | 0 ⭐ | 465 👁️ | Never ⏰ | []
text |

460 B

|

None

|

0 👍

/

0 👎

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