If you’ve spent some time reviewing your events in any of the calendar views provided with Events Calendar Pro, you’ve likely noticed a button below your event list or calendar that looks something like this:

Subscribe to calendar button

Clicking on this button will generate and save to your device an ICS file for the displayed events, which can then be imported into external applications such as Apple’s Calendar, Outlook, or Google Calendar. By default, the name for this ICS file is constructed as a combination of your site’s name plus a random string of numbers and letters–unique, but perhaps not particularly descriptive for your users. If you’d prefer to change the default file name for your ICS exports to something more memorable, this snippet will let you do just that. Simply add these lines to your theme’s functions.php file:

add_filter( 'tribe_events_ical_feed_filename', function() {
 return 'my-custom-ical-filename.ics';
 } );

This will set the new default file name for your exports to my-custom-ical-filename.ics. If you’d like to use a name that’s unique to your site, just change this text in the snippet (but make sure the .ics extension remains intact).

We hope you’ll find this snippet useful if you’ve been looking to make your ICS files just a bit more user-friendly! As always, if you should have any questions, our support team is always just a click away over at our help desk. Don’t hesitate to stop on by!