Forked from geoffgraham/gist:f28a14fb13796ccecf39
Last active
September 17, 2015 21:46
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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