custom query – weekends

Home Forums Calendar Products Events Calendar PRO custom query – weekends

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #109464
    Lynden Jones
    Participant

    Is there a way to isolate the sat and sun events in a post query?
    I think it would work similar to this – http://pastebin.com/9BhbUm7R but I am not sure how to tell it to only show saturday and sunday each week.

    #109470
    Barry
    Member

    Hi – great question!

    I suspect you could do so, but it is probably pushing the bounds of what you can reasonably do with tribe_get_events() alone – unless you also make use of meta data (which would need to be set up to mark relevant events as taking place on the weekend) – or else you could add your own conditions to the query by filtering the different components that make it up.

    Alternatively, though less efficiently, you could retrieve all events in a given date range and discard those not taking place on the weekend with some custom PHP logic after the query results are obtained.

    In either case it’s really a bit beyond what we can assist you with here, I’m afraid, but hopefully that gives you some ideas to explore.

    Thanks!

    #112503
    Lynden Jones
    Participant

    it seems to be working with this code – http://pastebin.com/08FWtvCW

    #138309
    Barry
    Member

    Closing this thread as it’s been quite a while – of course if we can help with anything else please do create a new thread. Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘custom query – weekends’ is closed to new replies.