{"id":1896702,"date":"2019-10-18T13:19:54","date_gmt":"2019-10-18T17:19:54","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/changing-the-number-of-events-in-ical-export\/"},"modified":"2024-07-22T05:45:56","modified_gmt":"2024-07-22T09:45:56","slug":"changing-the-number-of-events-in-ical-export","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/changing-the-number-of-events-in-ical-export\/","title":{"rendered":"Changing the Number of Events for the Subscribe Button"},"content":{"rendered":"\n<p>The Events Calendar includes a nifty option to export the events on your calendar in a flash. Visit your calendar and you&#8217;ll notice a button at the bottom.&nbsp;Refer to the <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/k\/exporting-events\/\" target=\"_blank\" rel=\"noreferrer noopener\">Subscribing and Exporting Events<\/a> article for details on the basic functionality.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2021\/11\/Screen-Shot-2021-11-30-at-7.33.42-AM.png\" alt=\"Subscribe to month\" class=\"wp-image-1951328\"\/><\/figure>\n\n\n\n<p>By default, clicking that button 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<h3 class=\"wp-block-heading\" id=\"h-usage\">Usage<\/h3>\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:\/\/staging.theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">document<\/a> on custom code best practices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-plugins\">Plugins<\/h3>\n\n\n\n<p>The Events Calendar<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-snippet\">Snippet<\/h3>\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.&nbsp;For some advanced export options and date ranges you might want to look at our <a href=\"https:\/\/theeventscalendar.com\/extensions\/advanced-ical-export\/\" target=\"_blank\" rel=\"noreferrer noopener\">Advanced iCal Export extension<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-notes\">Notes<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Originally written in January 2019<\/li>\n\n\n\n<li>Tested with The Events Calendar 4.5.2.1<\/li>\n\n\n\n<li>Author: Andr\u00e1s Guseo<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The Events Calendar includes a nifty option to export the events on your calendar in a flash. Visit your calendar and you&#8217;ll notice a button at the bottom.&nbsp;Refer to the Subscribing and Exporting Events article for details on the basic functionality. By default, clicking that button will give you the next 30 events. This limit&#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:\/\/staging.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":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"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":177,"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":128,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1896702"}],"version-history":[{"count":6,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896702\/revisions"}],"predecessor-version":[{"id":1961747,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1896702\/revisions\/1961747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1896702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1896702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1896702"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1896702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}