Show more than ten events in Advanced List Widget

The Advanced List Widget in Events Calendar PRO includes options to customize its appearance, one of which is to set the maximum number of events that it displays. The maximum number available under Appearance → Widgets is currently 10 events.

kb-snippet-widget-list-max-events

That's more than enough events for most sites, but what if it's not? Here's a snippet that allows you to increase that to any number of events. The example here is set to 30, but you can change that to suit your needs.

A few things to note when using this snippet:

  • This is only applicable to the Advanced List Widget in Events Calendar PRO. It will have no effect on the Event List widget that comes with the standard version of The Events Calendar.
  • Add the snippet to your theme's functions.php file (preferably in a child theme)
  • The widget settings will continue to show a maximum of 10 events, but this snippet will override that on the front end of your site
  • Be mindful of performance. While displaying 30 or so events should have no impact on the speed of your site, showing hundreds of events might.