How to hide past events

Home Forums Calendar Products Events Calendar PRO How to hide past events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #214112
    barn2media
    Participant

    Hi, I’m setting up this plugin for a client and they are very unhappy that past events are displaying on their site, as she obviously only wants to promote future events to her customers. How can I hide the past events from the front end?
    Many thanks

    #214679
    Brook
    Participant

    Howdy barn2media,

    I would love to help you with that. I actually have a great starting point of code for you. It is a simple modification of existing snippet. It will no doubt require further testing and modification on your part, but the principle behind it is that it hooks into our tribe queries, if this is not the admin area then it adds an extra WP Query param that hides events whose end dates are before the current server time. Simple enough aye? Hopefully that will work for you. You might have to add some extra logic for edge cases and stuff though, so test the code thoroughly.

    Does that all make sense? Did that work for you?

    – Brook

    #214681
    Brook
    Participant

    Howdy barn2media,

    I would love to help you with that. I actually have a great starting point of code for you. It is a simple modification of existing snippet. It will no doubt require further testing and modification on your part, but the principle behind it is that it hooks into our tribe queries, if this is not the admin area then it adds an extra WP Query param that hides events whose end dates are before the current server time. Simple enough aye? Hopefully that will work for you. You might have to add some extra logic for edge cases and stuff though, so test the code thoroughly.

    Does that all make sense? Did that work for you?

    – Brook

    #793232
    Brook
    Participant

    Hey I managed to double post! Since this thread has gone for a spell without any updates I am going to archive it. Should you need further assistance though please do not hesitate to open a new topic. Cheers!

    – Brook

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to hide past events’ is closed to new replies.