Integrating events into main blog loop

Home Forums Calendar Products Events Calendar PRO Integrating events into main blog loop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1009094
    Tahj-Edward
    Participant

    In the Event Calendar Pro Update 3.12.1

    Fix – Ensure integration of events in the main blog loop does not cause breakages (our thanks to cwheelsone, Tracey and many others on the forums for reporting this)

    I am using the theme valenti and I am still having this problem. It was working fine when I just activated the plugin but somehwere along the lines of me setting it up. It reversed the order of all the posts on my main blog feed.

    #1009095
    Tahj-Edward
    Participant

    This reply is private.

    #1009294
    Brian
    Member

    Hi,

    Sorry for the issues you are having. Looks like we have a bug here causing this and we are working on getting a patch out.

    Adding this to your theme’s functions.php may resolve the issue.

    function fix_blog_loop_event_ordering( $sql, $query ) {
    if ( ! class_exists( 'Tribe__Events__Pro__Main' ) ) {
    return;
    }

    if ( ! isset( $query->query_vars[ 'is_tribe_widget' ] ) || ! $query->query_vars[ 'is_tribe_widget' ] ) {
    if ( tribe_is_month() || tribe_is_week() || tribe_is_day() ) {
    return $sql;
    }
    }

    if ( ! empty( $query->tribe_is_event ) || ! empty( $query->tribe_is_multi_posttype ) ) {
    if ( isset( $query->query_vars[ 'tribeHideRecurrence' ] ) && $query->query_vars[ 'tribeHideRecurrence' ] ) {
    return str_replace( 'ORDER BY EventStartDate ASC', 'ORDER BY EventStartDate DESC', $sql );
    }
    }

    return $sql;
    }

    add_filter( 'posts_request', 'fix_blog_loop_event_ordering', 20, 2 );

    Let me know how that works out.

    Thanks

    #1010651
    Geoff
    Member

    Hey there! Just a heads up that The Events Calendar 3.12.3 and The Events Calendar PRO 3.12.2 shipped just minutes ago and include a fix for the issue you reported here. Please do check it out and make the update!

    Thanks for your patience and support while we worked this out. 🙂

    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Integrating events into main blog loop’ is closed to new replies.