Home › Forums › Calendar Products › Events Calendar PRO › Show Recurring Events
- This topic has 20 replies, 3 voices, and was last updated 7 years, 10 months ago by Oliver Mark.
-
AuthorPosts
-
June 24, 2016 at 12:46 pm #1131717NicoMember
This reply is private.
June 27, 2016 at 9:35 am #1132423Oliver MarkParticipantHi, Nico.
Thanks for the reply.
In order to see the events, you have to go the portuguese posts. Your profile is showing the english posts by default. I’m sorry I didn’t say this before.
About the events list, yes, I’m looking to always show all recurrences of an upcoming recurring event.
Let me know if I can help with something else.
Regards.
June 28, 2016 at 4:31 pm #1133210NicoMemberHey Oliver,
Thanks for the patience here! I crafted a little code snippet in order the get this done, please try pasting it in your theme (or child theme) functions.php file:
/* Tribe - insert a list of upcoming instances for recurring events in the list widget */
function tribe_inject_recurring_instances ( ) {if ( !tribe_is_recurring_event ( ) ) return;
$event_id = Tribe__Events__Main::postIdHelper( null );
$post = get_post( $event_id );$parent_id = $post->post_parent;
if ( !$parent_id ) $parent_id = $event_id;
$child_events = tribe_get_events( array( 'eventDisplay' => 'list', 'post_parent' => $parent_id, 'post__not_in' => array( $event_id ) ) );
if ( empty ($child_events) ) return;
echo '
- ';
- ' . $post->post_title . ' - ' . tribe_get_start_date( $post ) . '
foreach ( $child_events as $post ) { setup_postdata( $post );echo '
';
}
echo '';
}add_action('tribe_events_list_widget_after_the_meta', 'tribe_inject_recurring_instances' );
Please let me know if this works as intended,
Best,
NicoJuly 4, 2016 at 7:12 am #1135079Oliver MarkParticipantHi, Nico!
Thank you for the patience!
Your code works like a charm! It is exactly what I was looking for.
I’m marking this thread as resolved.
Thank you very much for your assistance during the last few weeks.
Best regards
July 4, 2016 at 9:03 am #1135098NicoMemberSuper stocked to hear Oliver! Thanks for the patience on your side as well 🙂
I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.
Best,
Nico -
AuthorPosts
- The topic ‘Show Recurring Events’ is closed to new replies.