« vTiger non-standard port forward ssl/https 'illegal request' | Main | FreeNAS export NFS w/ ADFS/CIFS permissions »
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



Post a crit
Name:


Email Address:


URL:


crits:


Remember info?