Display time in Month view title

Home Forums Calendar Products Events Calendar PRO Display time in Month view title

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1091426
    Andrew Bacon
    Participant

    I found this on the forums and added the folloing code to functions.php – it doesn’t appear to be working:

    <?php

    /*
    * Adds start time to event titles in Month view
    */

    function tribe_add_start_time_to_event_title ( $post_title, $post_id ) {

    if ( !tribe_is_event($post_id) ) return $post_title;
    // Checks if it is the month view, modify this line to apply to more views
    if ( !tribe_is_month() ) return $post_title;

    $event_start_time = tribe_get_start_time( $post_id );

    if ( !empty( $event_start_time ) ) {
    $post_title = $event_start_time . ' - ' . $post_title;
    }

    return $post_title;
    }
    add_filter( 'the_title', 'tribe_add_start_time_to_event_title', 100, 2 );

    ?>

    #1091429
    Andrew Bacon
    Participant

    Never mind. Something must have been cached – it took a few minutes, but is now working.

    #1091432
    George
    Participant

    Glad to hear it—thanks for the update! 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Display time in Month view title’ is closed to new replies.