Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( tribe_is_recurring_event() ) {
- $dates = get_post_meta( get_the_ID(), '_EventStartDate' );
- $this_date = tribe_get_start_date( null, false, 'Y-m-d H:i:s' );
- $future_instances = array();
- foreach ( $dates as $date ) if ( $date > $this_date ) {
- $instance_date = new DateTime( $date );
- $future_instances[] = ' ' . $instance_date->format( get_option( 'date_format' ) ) . ' ';
- }
- if ( ! empty( $future_instances ) ) {
- echo 'Also taking place on ' . join( '|', $future_instances );
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement