september 2015
sun mon tue wed thu fri sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

« April 2015 | Main | January 2017 »


September 17, 2015
The Events Calendar Wordpress full ical/ics export

To export all events from 'The Events Calendar' wordpress calendar plugin, add this to functions.php:

add_action( 'pre_get_posts', 'full_ical_export' );
function full_ical_export( WP_Query $query ) {
if ( ! isset( $_GET['ical'] ) || ! isset( $_GET['full-export'] ) ) return;
if ( ! isset( $query->tribe_is_event_query ) || ! $query->tribe_is_event_query ) return;
$query->set( 'eventDisplay', 'custom' );
$query->set( 'start_date', '1000-01-01' );
$query->set( 'end_date', '3000-01-01' );
$query->set( 'posts_per_page', '-1' );
}

Then visit this URL in a browser to spit out a fully populated .ics file:

http://yoursitehere.com/events/?ical=1&full-export

crit?: 0