• Resolved grebos

    (@grebos)


    I found the em_calendar_template_args filter through which it is possible to filter the events which appear in the Ical file. My question is, if it is possible to set up different links to different Ical files with different Filter settings?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    might be possible, you can try to modify template file at events-manager/templates/templates/ical.php

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

    eg. wp-content/themes/Your Theme/plugins/events-manager/templates/ical.php

    Thread Starter grebos

    (@grebos)

    Thanks, I solved it using php get arguments to pass arguments to the filter. The filtering itself works like here
    The the ics file gets now caled via the link yourwpsite.com/events.ics?mode=event_type_1

    
    function custom_em_ical_filter($args){
    	$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
    	if($mode == 'event_type_1'){
    		$args['event_type'] = 'event_type_1';
    	}
    	if($mode == 'event_type_2'){
    		$args['event_type'] = 'event_type_2';
    	}
    	return $args;
    }
    • This reply was modified 8 years, 6 months ago by grebos.
    • This reply was modified 8 years, 6 months ago by grebos.

    Thanks for the update & code example; might help someone else.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multiple Ical files with different filters’ is closed to new replies.