simonlandin

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • simonlandin
    Participant

    Hi

    I’ve now resolved the issue by removing the local host install

    Thanks

    Simon

    simonlandin
    Participant

    Yup 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;
    }

    }
    }

Viewing 2 posts - 1 through 2 (of 2 total)