Show longterm events in current month

Home Forums Calendar Products Events Calendar PRO Show longterm events in current month

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1331989
    Felix
    Participant

    Hi guys,

    this might have been asked before, but maybe I simply didn’t find it:

    When I am in list view and I have events which are spanning over several weeks and months, the list keeps showing the event in the starting month. This makes the event look outdated. So I have written a quick filter to remove the date-header:

    /* Tribe Events: Remove the month header in the list view view if the starting month has passed */
    function tribe_remove_past_date_headers($html, $event_month, $event_year){
        if(date('Ym', tribe_get_start_date(null, false, 'U')) < date('Ym') ){
            $html = '';
        }
        return $html;
    }
    add_filter( 'tribe_events_list_the_date_headers', 'tribe_remove_past_date_headers', 10, 2 );

    I have also modified the “list/single-event.php” to check if a longterm event has started already. It then displays the end-date instead with a little “until” pre-text before it.

    It would be nice if there would be a default way to do this. Maybe the snippet above helps anyone else though.

    Cya
    Felix

    #1332636
    Cliff
    Member

    Thanks for sharing, Felix!

    We try to make our plugins extensible so you can accomplish such things just how you did! 🙂 There are hundreds of ways to customize and therefore not an option for every possible customization.

    If there’s any question you had that I didn’t answer, please let me know and I’ll do my best to help.

    #1342499
    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 ‘Show longterm events in current month’ is closed to new replies.