Follow Up: Widget calendar listing events with no result

Home Forums Calendar Products Events Calendar PRO Follow Up: Widget calendar listing events with no result

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1030321
    Nicholas
    Participant

    I’m wondering if there has been any progress on this bug:

    Widget calendar listing events with no result

    thank you.

    #1030395
    Brian
    Member

    Hi,

    We have not release out to resolve this, but our 4.0 release has a patch for this.

    We are finishing up testing on it and we hope to have it out in early December.

    If you need the fix right away you could try out the Release Candidates on a staging site first and if everything looks good then on a live site, by signing up for the beta program:

    http://betas.theeventscalendar.com/

    Let me know if you have any follow up questions.

    Thanks

    #1032954
    Nicholas
    Participant

    Thank you for the continued help. I tried the beta and it did not resolve this issue. I then discovered that the problem is related to a function conflict (see below)

    The purpose of this function was to remove events in the category “tech” from the main events page. My goal is to have a main events page that functions normally but excludes all events in the “tech” category. However, I need the mini calendar to be excluded from this function so that it shows only the category events when the filter is engaged.

    Is there another way to accomplish this? Or is there away to keep the function I have but fix it so that the filter works correctly on the mini calendar?

    // Removes categories "tech" from list and month views
    add_action( 'pre_get_posts', 'exclude_events_category' );
    function exclude_events_category( $query ) {
    if ( !is_singular( 'tribe_events' ) && $query->query_vars['eventDisplay'] == 'list' && !is_tax(TribeEvents::TAXONOMY) || $query->query_vars['eventDisplay'] == 'month' && $query->query_vars['post_type'] == TribeEvents::POSTTYPE && !is_tax(TribeEvents::TAXONOMY) && empty( $query->query_vars['suppress_filters'] ) || !is_page(3055)) {
    
    	$query->set( 'tax_query', array(
    
    		array(
    			'taxonomy' => TribeEvents::TAXONOMY,
    			'field' => 'slug',
    			'terms' => array('tech'),
    			'operator' => 'NOT IN'
    		)
    		)
    	);
    }
    return $query;
    }
    #1033232
    Brian
    Member

    Hi,

    That function runs before the Mini Calendar is even loaded so I do not think there is a way to make an exception for it.

    I only have this list of conditionals and none are for the mini calendar and i searched and there is none there.

    https://gist.github.com/jesseeproductions/903f5ca75877b713c674

    You could use the conditionals there and try to only run it on Event Views and Pages and that way the mini calendar would work everywhere else just not when in the event section.

    That is about all we have on this unfortunately.

    #1075856
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Follow Up: Widget calendar listing events with no result’ is closed to new replies.