Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theeventscalendar/40ed60514430907044a4 to your computer and use it in GitHub Desktop.
Save theeventscalendar/40ed60514430907044a4 to your computer and use it in GitHub Desktop.
Increase the number of events in the Advanced List Widget. See http://m.tri.be/18iv.
add_filter('widget_display_callback', 'increase_event_widget_limit', 10, 2);
/**
* Test if the current widget is an Advanced List Widget and fix the event limit if it is.
*/
function increase_event_widget_limit(array $instance, $widget) {
if (is_a($widget, 'Tribe__Events__Pro__Advanced_List_Widget'))
$instance['limit'] = 30;
return $instance;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment