To clarify: when I say that the above code doesn’t work, what happens is that none of my events show up when I use WP_Query.
However, if I use the following snippet (agelonwl’s plus category filter) with query_posts, my events show up, but I can’t hide any of them by category.
add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
if ( is_home() && false == $query->query_vars['suppress_filters'] ) {
$query->set( 'post_type', array( 'post', 'event' ) );
$query->set('category__not_in', array(45,72,73));
}
return $query;
}
Currently, my entire calendar posts on the blog, while I’d rather that event posts appear only a few at a time, as the date approaches. Even better, I’d like to be able to pick and choose which events show up on the front list, although the calendar should show all events. I thought I could do this by setting up an “Hidden” category and using Quick Edit to mark events as hidden or not.