This is a bug in The Events Calendar. It manipulates the post type of the global $query object, which seems to wreak havoc with other plugins that introduce custom post types or custom taxonomies. For now, you can add this to your functions.php
file, which fixed the issue for me:
function my_pre_get_posts( $query ) {
global $wp_the_query;
if ( $query === $wp_the_query && $query->is_main_query() && is_array( $query->query_vars['post_type'] ) && in_array( 'forum', $query->query_vars['post_type'] ) ) {
$query->query_vars['post_type'] = 'forum';
}
return $query;
}
add_filter('pre_get_posts', 'my_pre_get_posts', 11);
Cheers,
Eric
Thanks for that workaround, Eric.
Justin: does that work for you? We’d definitely be interested in investigating this further if our plugin isn’t playing nicely … can you provide a little more detail on when and where you see this, and how to replicate?
Thanks!