Woocommerce rewrite rule for product sub category
问题 Using this code here: add_filter('rewrite_rules_array', function( $rules ) { $new_rules = array( 'products/([^/]*?)/page/([0-9]{1,})/?$' => 'index.php?product_cat=$matches[1]&paged=$matches[2]', 'products/([^/]*?)/?$' => 'index.php?product_cat=$matches[1]', ); return $new_rules + $rules; }); And having these permalink settings Product category base: products Product permalink - custom base: /products/%product_cat% I get the following: /products/%category_name%/ (Parent Product Category Page