What am i doing incorrectly? Repeating events list start date of initial event

WordPress Event Management, Calendars & Registration Forums General Question What am i doing incorrectly? Repeating events list start date of initial event

This topic contains 4 replies, has 3 voices, and was last updated by  Stephen Harris 10 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9219

    Hi. Please take a look at http://calvarypresbyterian.org/events-3/
    Please browse to February and look at any of the events called
    Interfaith Winter Shelter Volunteer Opportunity
    These are recurring events starting 2 Feb thru 8 Feb
    If you click on any event (say 3 Feb, 4, Feb, etc.) the date of the event is always 2 Feb.
    Is this how it is supposed to be.. or am I doing something wrong?
    Thank you
    -barak

    barak kassar
    #9226

    I’m also working with reoccurring events and had a similar question. It seems that EO always shows the date of the initial event and not of the clicked reoccurrent event. I found a workaround over a uid attached to the event link that containes the missing information for later extraction. But this one works with a shortcode but not the calendar.

    See the topic:

    http://wp-event-organiser.com/forums/topic/reoccurring-events-jump-into-a-specific-event/

    Working example:

    http://www.digital-art-school.de/events/event/cinema-4d-maxon-certified-basiskurs/?uid=2014032465197

    Adrian Maleska
    #9233

    @Barak, Yes that is intended behaviour. The event page is one page for the entire event (regardless of how many dates it occurs on) and is effectively occurrence agnostic. The fact that there is only one page was a very early design choice based on SEO considerations, performance implications (and that an event can be to a certain degree equated to a ‘post’, regardless of dates) and a degree of personal preference ;).

    There are some technical reasons while occurrence links point to the event as a whole rather than a specific date to do with the use of get_permalink(). In some cases (such as the calendar), it’s possible to work-around this and change the link to include a reference to the occurrence which you then use on the event page (as linked by Adrian). But the default behaviour is intended to be as you describe.

    Stephen Harris
    #9255

    Thank you Adrian and Stephen
    Adrian.. have you found a way to auto-add that uid to a list of events in the shortcode.
    And Stephen, if Adrian’s solution is for shortcode, and you mention there is also a work-around for calendar, can u please share that.
    Then both scenarios are covered which is great!
    -barak

    barak kassar
    #9257

    You can do it by editing the shortcode templates (and any other template), and replace any instance of get_permalink() with

    global $post;
    add_query_arg( 'oid', $post->occurrence_id, get_permalink( $post->ID ) );

    (assuming your following the topic that Adrian linked to above).


    Calendars are different, they have filters:

    The fullCalendar (event link) filter passes the event ID (or post ID) and occurrence ID, which you can use to generate the desired link:

    add_filter('eventorganiser_calendar_event_link','barak_fullcalendar_link_to_occurrence',10,3);
    function barak_fullcalendar_link_to_occurrence( $link, $event_id, $occurrence_id ){
         return add_query_arg( 'oid', $occurrence_id, get_permalink( $event_id ) );
    }
    Stephen Harris
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.