Make Events that end at 2am Disappear from Event List View at 2am?

Home Forums Calendar Products Events Calendar PRO Make Events that end at 2am Disappear from Event List View at 2am?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32365
    Adam
    Participant

    A lot of events I add to Events Calendar Pro are nightclub shows that end at 2am. Is there a way to make the events disappear from the Events list view after 2am or after the events end time because right now events stay at the top of the Events list for the extra 22 hours after the event ends.

    Say I have an event listed for February 10 at ten pm that ends at 2am February 11th. That event stays at the top of the Events list view until February 12th even though it ended two hours into the day. Sometimes there’s multiple events that end at 2am so people seeing 5 or 6 events at 9am that expired hours prior is kind of annoying

    #32423
    Barry
    Member

    Well, there are a few strategies you might use here. The easiest to implement is to add a little code to your custom list.php template (see our tut on template overrides if you are unsure about creating custom templates).

    This code could be placed after the opening line of the event loop (in list.php):

    while ( have_posts() ) : the_post();

    And simply checks to see if the event started before today’s date and, if that is the case, ignores it.

    Does that help here?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Make Events that end at 2am Disappear from Event List View at 2am?’ is closed to new replies.