tribe_get_recurrence_start_dates

Home Forums Calendar Products Events Calendar PRO tribe_get_recurrence_start_dates

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1339577
    Ulf
    Participant

    Hi,

    I am using tribe_get_recurrence_start_dates to list recurring dates on a single event page.


    if (tribe_is_recurring_event()) {
    $recurring_dates = [];
    foreach (tribe_get_recurrence_start_dates() as $recurring_date) {
    $recurring_dates[] = $recurring_date;
    }
    array_shift($recurring_dates);
    };

    and then

    <?php if (isset($recurring_dates)) : ?>
    <div class="recurring-dates">
    <span class="header">FLER DATUM</span>
    <?php
    foreach ($recurring_dates as $date) {
    echo '<i class="fa fa-calendar" aria-hidden="true"></i><span class="date-label">' . get_event_formatted_date($date) . '</span><br>';
    }
    ?>
    </div>
    <?php endif; ?>

    It’s working nice but I want the possible to link each date to it’s related event page.
    It there a way to get the post_id’s or similar for recurruring events so I can create a link.
    Let’s say for a example tribe_get_recurrence_post_ids() method or similar.

    #1340041
    Andras
    Keymaster

    Hello Ulf,

    That looks like a funky customization. 🙂

    I believe there is no such function you are looking for.

    However, the url of the recurring events looks like this:

    http://domain.com/event/{event-slug}/<em>yyyy-mm-dd</em>/

    So for example:

    http://wpshindig.com/event/startup-happy-hour/2017-08-11/

    So if you have the slug and the date, you should be able to create the url for every recurrence.

    Does this help?

    Andras

     

    #1349846
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘tribe_get_recurrence_start_dates’ is closed to new replies.