Home › Forums › Calendar Products › Events Calendar PRO › Recurring events display
- This topic has 5 replies, 4 voices, and was last updated 9 years, 2 months ago by
Rob Vander Giessen-Reitsma.
-
AuthorPosts
-
January 24, 2017 at 5:12 am #1222869
Rob Vander Giessen-Reitsma
ParticipantI would like to slightly alter the way recurring events are displayed on my site’s homepage and single event pages; I haven’t been able to find a way to do this anywhere, but it seems like it wouldn’t be terribly difficult.
On the homepage (http://trriviera.com/new/), I would like recurring events to simply post a link that says ‘See all dates and times’ that would link to the event listing that shows all of that event’s instances (http://trriviera.com/new/event/the-ardennes/all/). At the moment, it is listing the events and there simply isn’t space for that in the design.
On the event page (http://trriviera.com/new/event/the-ardennes/2017-01-26/), I would like to simply list the instances of the recurring event. Under the recurring section on the left, it currently describes the recurrences. Instead, I would like to simply list all instances: January 22 @ 12:00pm, January 26 @ 3:00pm, etc.
If I can manage to make these small changes, the site will be complete and will be perfect for the theater using it. Any help you can provide would be greatly appreciated. Thank you!
January 24, 2017 at 11:20 am #1223121Rob Vander Giessen-Reitsma
ParticipantOkay, so for the single event page, it appears that this is the relevant code that displays the recurring event data:
<?php if ( function_exists( 'tribe_is_recurring_event' ) && function_exists( 'tribe_get_recurrence_text' ) && tribe_is_recurring_event( get_the_ID() ) ) : ?> <tr> <th> <?php _e( 'Recurring:', 'tokopress' ) ?> </th> <td> <?php echo tribe_get_recurrence_text( get_the_ID() ); ?> <?php if ( function_exists( 'tribe_all_occurences_link' ) ) : ?> <?php printf( '<br/><a href="%s">%s</a>', esc_url( tribe_all_occurences_link( get_the_ID(), false ) ), __( '(See All)', 'tokopress' ) ); ?> <?php endif ?> </td> </tr> <?php endif ?>So, my question is this: how would I edit this to list the date and time for all instances (instead of describing the recurrence as is happening now)? Any ideas?
January 24, 2017 at 12:30 pm #1223155Rob Vander Giessen-Reitsma
ParticipantI’ve figured out how to resolve my issues on the homepage, which was the simpler of the two issues. But I still need the code to list all instances of a recurring event (ex. – January 22 @ 12:00pm, January 26 @ 3:00pm, etc.). Effectively, I need to overwrite or replace this function:
<?php echo tribe_get_recurrence_text( get_the_ID() ); ?>January 25, 2017 at 8:56 am #1223761Andras
KeymasterHello Rob,
Thanks for reaching out! That looks like a funky customization you wanna do there. It should be possible.
As a starter, here are 2 articles that should help you with theme overrides:
And our list of functions should be helpful as well: https://theeventscalendar.com/functions
I think you will need these functions:
tribe_is_recurring_event
tribe_get_recurrence_start_dates
Let me know if this helps and if you have any more questions.
Cheers,
AndrasFebruary 16, 2017 at 8:35 am #1238690Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Recurring events display’ is closed to new replies.
