Changing the number of events in iCal export

Description

The Events Calendar PRO includes a nifty option for you and your visitors to export the events on your calendar in a flash. Visit your calendar and you'll notice a button at the bottom.

(Refer to the Exporting Events article for details on the basic functionality.)

By default clicking that button will give you the next 30 events. It is possible to change that however.

Usage

Copy the below code into your (child) theme's functions.php file (or wherever you usually put custom code).

Plugins

Events Calendar PRO

Snippet

add_filter( 'tribe_ical_feed_posts_per_page', function() { return 100; } );

The above snippet will give you 100 events in your export. Of course you can adjust that number to your liking.

For some advanced export options and date ranges you might want to look at our Advanced iCal Export extension.

Notes

  • Originally written in January 2019
  • Tested with Event Calendar PRO 4.5.2.1
  • Author: AndrĂ¡s Guseo

Disclaimer

As with all of our recipes, please note that we share this in the hope it will be useful but without any guarantees or commitments. If you wish to use it, it is your responsibility to test it first of all and adapt it to your needs (or find someone who can do so on your behalf). We are unable to provide further support in relation to this recipe.