Select multiple categories with is_tax
Thanks to @SallyCJ for the correct answer — you can supply an array of category IDs/slugs/names to is_tax() to check for multiple categories. Here is the correct code: /* Hyde out of stock product specific category */ add_filter( ‘pre_get_posts’, ‘hide_out_of_stock_from_cat’ ); function hide_out_of_stock_from_cat( $query ) { if ( $query->is_tax( ‘product_cat’, array( 15, 16, 18, 19, … Read more