Upgraded to Cal Pro 3.12.1, Cal 3.12, Community Evenst 3.12

Home Forums Calendar Products Events Calendar PRO Upgraded to Cal Pro 3.12.1, Cal 3.12, Community Evenst 3.12

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1008421
    Conor Whelan
    Participant

    I just upgraded to Cal Pro 3.11 Now home page posts are missing

    See the above thread. The New issue is that now when ‘Include events in main blog loop’ is checked, posts from 7 years ago show up on the home page. Unchecked, they go away. So obviously these are not recent calendar events.

    I went through the same testing procedures again … as recommended

    #1008571
    Barry
    Member

    Hi @cwheelsone,

    I’m sorry for the further difficulties. Unfortunately, it looks like the specific fix for that problem has unmasked a different problem in the same area.

    function fix_blog_loop_event_ordering( $sql, $query ) {
    	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 );

    Would you be able to try adding the above snippet to your theme’s functions.php file or some other suitable location (as an interim measure) – and does that help?

    #1013099
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Upgraded to Cal Pro 3.12.1, Cal 3.12, Community Evenst 3.12’ is closed to new replies.