Skip to content

Instantly share code, notes, and snippets.

@geoffgraham
Last active July 5, 2016 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save geoffgraham/f28a14fb13796ccecf39 to your computer and use it in GitHub Desktop.
Save geoffgraham/f28a14fb13796ccecf39 to your computer and use it in GitHub Desktop.
The Events Calendar 3.12.1 // Increase Number of Events in Advanced List Widget
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