Multiple ICAL feed urls
-
Hi all,
I searched a solution to have different urls for specific categories. The only way I know is to change the core file /plugins/events-manager/em-ical.php and add more of these blocks:
if ( preg_match('/events.ics$/', $_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI'] == '/?ical=1' ) { header('Content-type: text/calendar; charset=utf-8'); header('Content-Disposition: inline; filename="events.ics"'); //send headers em_locate_template('templates/ical.php', true); die(); }I changed the filename to xy_events.ics and templates/ical.php to templates/xy_ical.php
I use tempate files and copied the /events-manager/templates/ical.php file and renamed it like above. In each of these files I changed the following line:
$args = array_merge(array('limit'=>$page_limit, 'page'=>'1', 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') ), $args);and added
'category'=>'[ID of the category e.g 42]'The only problem is that I have to edit the em-ical.php file after every update. Is there any other way to do this?
Thanks!
Events Manager Version 5.6.2 (free)
The topic ‘Multiple ICAL feed urls’ is closed to new replies.