jwhite

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Change color of "View All" Link on Calendar #1016952
    jwhite
    Participant

    Hi Geoff,
    That worked great, thank you! 🙂

    jwhite
    Participant

    That worked. Thank you so much, Brian!

    jwhite
    Participant

    Thank you for the reply, Brian. I added the code that you linked to here: https://gist.github.com/jesseeproductions/a467b28a8b8010d4015b on to my theme’s functions.php – it did not hide the categories I’m looking to hide. Here is what I added:

    // 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'] ) ) {
    
    	$query->set( 'tax_query', array(
    
    		array(
    			'taxonomy' => TribeEvents::TAXONOMY,
    			'field' => 'slug',
    			'terms' => array('agency-distribution,community-market,mobile-pantry'),
    			'operator' => 'NOT IN'
    		)
    		)
    	);
    }
    return $query;
    }
    

    Before I created this post, I used the code here: https://gist.github.com/theeventscalendar/c9580839c3a76778d583
    on my functions.php file. It did hide the events in the category from the main calendar, but it also hid the events from their own category calendar – which is where I want them to appear.

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