Forum Replies Created
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
Roman
ParticipantThanks, now it works.
Roman
ParticipantThanks for the reply, Josh.
I found this code:
<?php /** * Single Event Template for Widgets * * This template is used to render single events for both the calendar and advanced * list widgets, facilitating a common appearance for each as standard. * * You can override this template in your own theme by creating a file at * [your-theme]/tribe-events/widgets/modules/single-widget.php * * @package TribeEventsCalendarPro * */ global $post, $wp_query; $class = ""; if ( $wp_query->current_post == 1 ) { $class = ' first '; } if ( $wp_query->current_post + 1 == $wp_query->post_count ) { $class .= ' last '; } $startDate = strtotime( $post->EventStartDate ); $endDate = strtotime( $post->EventEndDate ); $today = time(); /* If the event starts way in the past or ends way in the future, let's show today's date */ if ( $today > $startDate && $today < $endDate ) { $postDate = $today; } else { $postDate = $startDate; } /* If the user clicked in a particular day, let's show that day as the event date, even if the event spans a few days */ if ( defined( "DOING_AJAX" ) && DOING_AJAX && isset( $_POST['action'] ) && $_POST['action'] == 'tribe-mini-cal-day' ) { $postDate = strtotime( $_POST["eventDate"] ); } ?>I tried various options, but to bring a date in this format I have not worked.
For example, display the date in plain text does not cause problems:echo tribe_get_start_date( $event->ID );If you know how to solve this problem, I will be very grateful to you.
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
