Forum Replies Created
-
AuthorPosts
-
July 28, 2015 at 6:26 pm in reply to: The events Calendar Pro Update Available but out of installs #991238
simonlandin
ParticipantHi
I’ve now resolved the issue by removing the local host install
Thanks
Simon
June 13, 2015 at 4:18 am in reply to: tribe_events_cat query and tribe_events_list_the_date_headers() #969247simonlandin
ParticipantYup that worked – thanks for the advice.
Here’s the code I wrote (adapted from yours if anyone else can use it…
function club_tribe_events_list_the_date_headers() {/* Month and year separators (on every month and year change) */
$show_headers = apply_filters( 'tribe_events_list_show_date_headers', true );
$html = '';
if ( $show_headers ) {global $club_month, $post, $wp_query;
$event_year = tribe_get_start_date( $post, false, 'Y' );
$event_month = tribe_get_start_date( $post, false, 'm' );
$month_year_format = tribe_get_option( 'monthAndYearFormat', 'F Y' );
//echo $event_month; echo $event_year;
//echo "mymonth="; echo $club_month;
if ($event_month > $club_month) {
//echo "greater print the header";
$html .= sprintf( "<span class='tribe-events-list-separator-month'><span>%s</span></span>", tribe_get_start_date( $post, false, $month_year_format ) );
echo apply_filters( 'tribe_events_list_the_date_headers', $html, $event_month, $event_year );
$club_month = $event_month;
}elseif ($event_month == $club_month) {
//echo "no header";
$club_month = $event_month;
}
else {
//echo "lesser print the header";
$html .= sprintf( "<span class='tribe-events-list-separator-month'><span>%s</span></span>", tribe_get_start_date( $post, false, $month_year_format ) );
echo apply_filters( 'tribe_events_list_the_date_headers', $html, $event_month, $event_year );
$club_month = $event_month;
}}
} -
AuthorPosts
