WP_Query ignoring tax_query when is_singular

You can always use posts_clauses filter and add processing for tax_query in there (you don’t even need to write your own SQL): function filter_single_with_tax_queries( $clauses, $query ) { global $wpdb; if ( $query->is_singular ) { $query->parse_tax_query( $query->query_vars ); $tax_clauses = $query->tax_query->get_sql( $wpdb->posts, ‘ID’ ); $clauses[‘join’] .= $tax_clauses[‘join’]; $clauses[‘where’] .= $tax_clauses[‘where’]; } return $parts; } add_action( … Read more