I am working on a custom events integration and have created a custom taxonomy (special => ongoing) that I am using to display “ongoing” events on the sidebar in their own custom display. That is working well. 🙂
What I need to do is exclude the any listings with this taxonomy from the main displays for archive pages. I have done that just fine in the upcoming view (/events/category/arts/upcoming/) by adding the following function to the top of my ecp-page-template.php.
function excludeongoing () {
global $wp_query;
$newargs = array(
‘tax_query’ => array(
‘relation’ => ‘AND’,
array(
‘taxonomy’ => ‘special’,
‘field’ => ‘slug’,
‘terms’ => ‘ongoing’,
‘operator’ => ‘NOT IN’,
)
)
);
$args = array_merge( $wp_query->query_vars, $newargs);
query_posts($args);
}
What I can’t seem to do is find a way to control the query that is pulling in the events for the calendar grid view (/events/category/arts/month/). I would think the page template would do it, but it seems to still show my ongoing events. I tried adding it to the table.php and gridview.php as well. Where is that query for the calendar coming from?
Thanks for your help!