Advanced List Widget: Show more than 10 events (SOMETIMES!)

Home Forums Calendar Products Events Calendar PRO Advanced List Widget: Show more than 10 events (SOMETIMES!)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1184708
    Arnie
    Participant

    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!

    #1185427
    Cliff
    Member

    Hi Arnie.

    Thanks for your detailed question.

    How about just using the shortcode version of the widget?

    https://theeventscalendar.com/knowledgebase/pro-widget-shortcodes/#event-list-shortcode

    Examples

    [tribe_events_list limit="30"]

    [tribe_events_list limit="5"]

    Please let me know your thoughts.

    #1195871
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Advanced List Widget: Show more than 10 events (SOMETIMES!)’ is closed to new replies.