Query Next 2 Events in Recurring Event

Home Forums Calendar Products Events Calendar PRO Query Next 2 Events in Recurring Event

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #960922
    papertower
    Participant

    Greetings!

    I’m currently doing some very unconventional things with The Events Calendar Pro, and I was curious if it’s possible (almost certainly in code, which is preferable) to query for the next 2 events in a recurring event?

    I know it’s possible to show only the next event in a recurring event, but there was a request two have it be the next two, and I wasn’t sure if this was possible. All or one is simple, but somewhere in between can be rather difficult.

    Thanks!

    #961121
    Barry
    Member

    Hi papertower,

    I’d have thought that should be possible via a custom WP_Query or by using tribe_get_events().

    Recurring events are composed of a parent event and multiple children – so setting the eventDisplay property to list and specifying the correct post_parent ID ought to get you what you need here (and, of course, you would set posts_per_page accordingly).

    Does that help at all?

    #964398
    Barry
    Member

    Hi!

    It’s been a while so I’m going to go ahead and close this topic.

    • Need help with anything else? Go right ahead and post a new topic, one of the team will be only too happy to help
    • Still need help with this issue and need to re-open it? Again, please simply create a new topic and link to this one to provide the team with some context

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Query Next 2 Events in Recurring Event’ is closed to new replies.