Hello!
My site has many different places where it uses the advanced list widget to display all sorts of combos of events. I want to make it so that in certain instances, the limit of events displayed is greater than 10… but in other cases have the limit apply.
I tried using this code found in the support forum:
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;
}
unfortunately that doesn't work for me because in some places where i need the limit to apply, it overrides it. what would be ideal is code that would tell it to bump up the limit to 30 or whatever ONLY when 10 has been selected in the widget menu... but when some smaller number is chosen, it uses the smaller number.
Thanks!