Show all occurrences by event id

Home Forums Calendar Products Events Calendar PRO Show all occurrences by event id

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #938943
    Rob
    Participant

    Hello.
    Users register for a recurring event. I’m storing the ID of that event as user meta. On their ‘My Account’ page that we built, we want to show them all the dates that their event is on (ie each occurrence).

    I dug through the pastebins here: https://theeventscalendar.com/support/forums/topic/customize-output-of-recurring-events-list-titledesc-once-all-dates-under-that/ but got a little lost.

    For ease of use, we are wrapping this in a custom shortcode [my_schedule]. This gives us the ID of the event in the recurrence:

    global $current_user;
    get_currentuserinfo();
    $userid = $current_user->ID;
    $eventid = get_field('101_event_id', $userid);

    How do we display the future dates of each occurrence?

    Thanks

    #939114
    Josh
    Participant

    Hey Rob,

    Thanks for reaching out to us!

    I’ll have to do some research but I believe the best way to approach this would be to store the event slug rather than the ID. Currently I don’t believe we have an option for getting all instances of a recurring event from the main event ID. However, all instances of a recurring event are stored with the same title so if you use a “tribe_get_events” query and targeted the title, that may be the best option for getting the recurrences of the event.

    Let me know if this helps.

    Thanks!

    #939115
    Rob
    Participant

    Thanks!
    I’m not opposed to using the slug. Let me run some tests and see how that works for us.

    #939359
    Josh
    Participant

    Hey Rob,

    Awesome! Let me know how it turns out.

    Thanks!

    #983707
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Show all occurrences by event id’ is closed to new replies.