Theres a way to use $query->set(‘tax_query’ in pre_get_posts filter?
The $query variable in the filter represents a WP_Query object, so you shouldn’t be passing a new WP_Query object into the method for setting that object’s properties. The question you copied code from was incorrectly using the filter, which i feel is the crux of your issue. Yes, tax_query can be used inside a pre_get_posts … Read more