Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1470477

    The upcoming events shortcode that integrates with The Events Calendar Plugin https://theeventscalendar.com/ is not showing events that have a start range prior to the current date and an end date past the current date. I believe this is because you are querying on the start date vs the end date.

    Solution was to use the avia_tribe_events_upcoming filter

    // Fix issue with upcoming events not displaying events starting before today or being all day events
    add_filter( ‘avia_tribe_events_upcoming’, ‘fcfc_upcoming_events_query_fix’, 10, 2 );

    function fcfc_upcoming_events_query_fix($query, $params){
    $query[‘ends_after’] = ‘now’;
    $query[‘start_date’] = null;
    return $query;
    }

    See link to private video demonstrating issue.

    #1470535

    Hey Vada,

    Thank you for the inquiry.

    Please note that the Upcoming Event element will only display events that are not yet ongoing or have not yet started. It will also not display reccurrings events. If the start date of an event is prior to the current date, it will be excluded, and other upcoming events will be shown instead. However, you can still use the filter above if it works for your case.

    Best regards,
    Ismael

    #1470572

    Thank you Ismael for clarifying that this is the intended behavior and for your team for providing a hook to make this an easy modification.

    #1470585

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

    #1470592

    Thanks Rikard. You can close this ticket.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Upcoming Events shortcode not showing events that have a valid date range’ is closed to new replies.