{"id":1896702,"date":"2019-10-18T13:19:54","date_gmt":"2019-10-18T17:19:54","guid":{"rendered":"https:\/\/theeventscalendar.com\/knowledgebase\/changing-the-number-of-events-in-ical-export\/"},"modified":"2026-04-21T13:48:54","modified_gmt":"2026-04-21T17:48:54","slug":"customizing-export-functionality","status":"publish","type":"post","link":"https:\/\/theeventscalendar.com\/knowledgebase\/customizing-export-functionality\/","title":{"rendered":"Customizing the Calendar Export Functionality"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-changing-the-number-of-events-in-the-ical-export-file\">Changing the Number of Events in the iCal Export File<\/h2>\n\n\n\n<p>By default, clicking the Subscribe option will give you the next 30 events. This limit is in place because larger files are more likely to fail in iCal readers. That said, it is possible to change the number of exported events if you need to.<\/p>\n\n\n\n<p>Copy the below code into your theme&#8217;s <code>functions.php<\/code> file, preferably a child theme&#8217;s <code>functions.php<\/code> file, or, wherever you usually put custom code. The <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a> plugins is a very good option to add snippets like this to your site. For more information about adding custom code to your site, please visit our <a href=\"https:\/\/theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">document<\/a> on custom code best practices.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( \"tribe_ical_feed_posts_per_page\", function() { return 100; } );\n<\/pre><\/div>\n\n\n<p>This snippet will return 100 events in the export. Adjust that number to suit your needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-changing-the-ics-file-name\">Changing the .ics File Name<\/h2>\n\n\n\n<p>By default, the name for this ICS file is constructed as a combination of your site&#8217;s name plus a random string of numbers and letters&#8211;unique, but perhaps not particularly descriptive for your users. If you&#8217;d prefer&nbsp;to change the default file name for your ICS exports&nbsp;to something more memorable, this&nbsp;snippet will let you do just that. Simply add these lines to your theme&#8217;s <strong>functions.php<\/strong> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><pre class=\"brush: php; title: ; notranslate\" title=\"\">add_filter( &#039;tribe_events_ical_feed_filename&#039;, function() {\n return &#039;my-custom-ical-filename.ics&#039;;\n } );<\/pre><\/pre>\n\n\n\n<p>This will set the new default file name for your exports to&nbsp;<strong>my-custom-ical-filename.ics<\/strong>. If you&#8217;d like to use a name that&#8217;s unique to your site, just change this text in the snippet (but make sure the <strong>.ics<\/strong> extension remains intact).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-change-the-exported-calendar-name\">Change the Exported Calendar Name<\/h2>\n\n\n\n<p>The calendar name refers to the name you see in your calendar application, such as Outlook when subscribing to a calendar. It helps you identify and distinguish different calendars when you have multiple subscriptions or shared calendars.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1621\" height=\"969\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/05\/r912IHUK9d.png\" alt=\"\" class=\"wp-image-1960374\" style=\"width:500px\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/05\/r912IHUK9d.png 1621w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/05\/r912IHUK9d-300x179.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/05\/r912IHUK9d-1024x612.png 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/05\/r912IHUK9d-768x459.png 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2024\/05\/r912IHUK9d-1536x918.png 1536w\" sizes=\"auto, (max-width: 1621px) 100vw, 1621px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-ical-calendar-name\">iCal Calendar Name<\/h4>\n\n\n\n<p>Adding the following PHP snippet to your site will change the calendar name added to the iCal export,<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/masoodahmed\/32d642c0ab0ad838a75822ff3b4ccdfb.js\"><\/script>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-outlook-calendar-name\">Outlook Calendar Name<\/h4>\n\n\n\n<p>Similar to the prior snippet, the following will let you change the name of the calendar subscribers see when subscribing to the calendar through Outlook,<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/masoodahmed\/845e14c842c64ba5b23facf0f66aad40.js\"><\/script>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-for-developers\">For Developers<\/h4>\n\n\n\n<p>The above code snippets use the following filter hooks<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tribe_ical_feed_calname\/\">tribe_ical_feed_calname<\/a><\/li>\n\n\n\n<li>tec_events_ical_outlook_subscribe_url<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-remove-event-descriptions-from-all-calendar-exports\">Remove Event Descriptions from All Calendar Exports<\/h2>\n\n\n\n<p>If you\u2019d prefer not to include event descriptions in calendar exports, you can use the filters below to remove the content from all supported export formats. This applies to Outlook 365, Google Calendar, iCalendar (.ics), and Outlook Live.<\/p>\n\n\n\n<p>These filters will clear the description or body fields for each platform, so that attendees only see the event title, time, and other basic details, without the full description content.<\/p>\n\n\n\n<p>You can add the following code snippet to your theme\u2019s <code>functions.php<\/code> file or via a custom functionality plugin like <a href=\"https:\/\/wordpress.org\/plugins\/insert-headers-and-footers\/\">WP Code<\/a>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\/\/ Remove description from Outlook 365 export\nadd_filter( 'tec_events_ical_outlook_single_event_import_url', function ( $url, $base_url, $params ) {\n    $params&#x5B;'body'] = '';\n    return add_query_arg( $params, $base_url );\n}, 10, 3 );\n\n\/\/ Remove description from Google Calendar export\nadd_filter( 'tec_views_v2_single_event_gcal_link_parameters', function ( $pieces, $event ) {\n    $pieces&#x5B;'details'] = '';\n    return $pieces;\n}, 10, 2 );\n\n\/\/ Remove description from iCal \/ ICS exports\nadd_filter( 'tribe_ical_feed_item', function ( $item, $event ) {\n    $item&#x5B;'DESCRIPTION'] = 'DESCRIPTION:';\n    return $item;\n}, 10, 2 );\n\n<\/pre><\/div>\n\n\n<p>With these filters in place:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>description field will be blank<\/strong> when someone exports an event to any of the supported calendar tools.<\/li>\n\n\n\n<li>All other event details (like title, time, and location) will remain intact.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-add-a-custom-message-to-google-calendar-descriptions\">Add a Custom Message to Google Calendar Descriptions<\/h2>\n\n\n\n<p>When users add your event to Google Calendar, this tweak appends a custom note to the calendar description.<\/p>\n\n\n\n<p><strong>What it does:<\/strong> Appends custom text to the Google Calendar event details.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tec_views_v2_single_event_gcal_link_parameters', function( $params ) {\n    $params&#x5B;'details'] .= \"(Remember to arrive 15 minutes early!)\";\n    return $params;\n} );\n<\/pre><\/div>\n\n\n<p><strong>Result:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"276\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-02-at-00.45.27.png\" alt=\"\" class=\"wp-image-1965857\" style=\"width:492px;height:auto\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-02-at-00.45.27.png 852w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-02-at-00.45.27-300x97.png 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2025\/07\/Screenshot-2025-07-02-at-00.45.27-768x249.png 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/figure>\n\n\n\n<p><strong>Ref:<\/strong> <a href=\"https:\/\/docs.theeventscalendar.com\/reference\/hooks\/tec_views_v2_single_event_gcal_link_parameters\/\" target=\"_blank\" rel=\"noreferrer noopener\">tec_views_v2_single_event_gcal_link_parameters<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-change-default-protocol-for-ical\">Change Default Protocol for iCal<\/h2>\n\n\n\n<p>If you\u2019d prefer to change the default protocol of the <strong>Subscribe to Calendar<\/strong>&#8216;s iCal option, you can do so with a quick customization.<\/p>\n\n\n\n<p>By default, these links are generated with the <code>webcal:\/\/<\/code> protocol, which is designed for live iCalendar subscriptions. If instead you\u2019d like the link to use <code>https:\/\/<\/code> (so it downloads the <code>.ics<\/code> file directly rather than subscribing), you can override that default with a small code snippet.<\/p>\n\n\n\n<p>Add the following snippet to your site:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\nadd_filter( 'tec_views_v2_subscribe_links_feed_url', 'tec_modify_ical_to_https' );\nfunction tec_modify_ical_to_https( $link ) {\n    return str_replace( 'webcal:\/\/', 'https:\/\/', $link );\n}\n\n<\/pre><\/div>\n\n\n<p>After adding the snippet, clear any caching layers (plugin cache, server cache, or CDN cache) to make sure the new link updates correctly. Then, check your event page to confirm that the iCal link now uses <code>https:\/\/<\/code>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Changing the Number of Events in the iCal Export File By default, clicking the Subscribe option will give you the next 30 events. This limit is in place because larger files are more likely to fail in iCal readers. That said, it is possible to change the number of exported events if you need to&#8230;.<\/p>\n","protected":false},"author":3,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[79],"tags":[25,58],"stellar-product-taxonomy":[158],"class_list":["post-1896702","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippets","tag-customizations","tag-php","stellar-product-taxonomy-events-calendar-pro"],"acf":[],"taxonomy_info":{"category":[{"value":79,"label":"Snippets"}],"post_tag":[{"value":25,"label":"Customizations"},{"value":58,"label":"PHP"}],"stellar-product-taxonomy":[{"value":158,"label":"Events Calendar Pro"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Jaime Marchwinski","author_link":"https:\/\/theeventscalendar.com\/knowledgebase\/author\/jaimetri-be\/"},"comment_info":0,"category_info":[{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":18,"filter":"raw","term_order":"0","cat_ID":79,"category_count":18,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":25,"name":"Customizations","slug":"customizations","term_group":0,"term_taxonomy_id":25,"taxonomy":"post_tag","description":"","parent":0,"count":33,"filter":"raw","term_order":"0"},{"term_id":58,"name":"PHP","slug":"php","term_group":0,"term_taxonomy_id":58,"taxonomy":"post_tag","description":"","parent":20,"count":23,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896702"}],"version-history":[{"count":20,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896702\/revisions"}],"predecessor-version":[{"id":1969733,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896702\/revisions\/1969733"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896702"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}