Created
October 11, 2017 11:12
-
-
Save Pebblo/42235c19d65d7fc86fee88286315acfb to your computer and use it in GitHub Desktop.
Change the default output for the datetime list used by EE to display a date range, add this file to your theme/child themes root directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>'; | |
if ( is_single() || ( is_archive() && espresso_display_datetimes_in_event_list() ) ) : | |
global $post; | |
do_action( 'AHEE_event_details_before_event_date', $post ); | |
?> | |
<div class="event-datetimes"> | |
<?php | |
//espresso_list_of_event_dates( $post->ID ); | |
$date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', get_option( 'date_format' )); | |
$time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', get_option( 'time_format' )); | |
$single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', get_option( 'date_format' )); | |
$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', get_option( 'time_format' )); | |
echo espresso_event_date_range( $date_format, $time_format, $single_date_format, $single_time_format, $post->ID ); | |
?> | |
</div> | |
<!-- .event-datetimes --> | |
<?php | |
do_action( 'AHEE_event_details_after_event_date', $post ); | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment