Php 如何从wordpress URL中删除分类法段塞

Php 如何从wordpress URL中删除分类法段塞,php,wordpress,.htaccess,taxonomy,Php,Wordpress,.htaccess,Taxonomy,我已经创建了一个自定义后类型的汽车 我向它注册了两个分类法。制造商和类型 我已经像这样“预处理”了过滤器URL $new_rules = array( 'cars/(manufacturer|type)/(.+?)/(manufacturer|type)/(.+?)/?$' => 'index.php?post_type=eg_cars&' . $wp_rewrite->preg_index(1) . '=' . $wp_rewrite->preg_index(2) .

我已经创建了一个自定义后类型的汽车

我向它注册了两个分类法。制造商和类型

我已经像这样“预处理”了过滤器URL

$new_rules = array(
'cars/(manufacturer|type)/(.+?)/(manufacturer|type)/(.+?)/?$' => 'index.php?post_type=eg_cars&' . $wp_rewrite->preg_index(1) . '=' . $wp_rewrite->preg_index(2) . '&' . $wp_rewrite->preg_index(3) . '=' . $wp_rewrite->preg_index(4),
'cars/(manufacturer|type)/(.+)/?$' => 'index.php?post_type=eg_cars&' . $wp_rewrite->preg_index(1) . '=' . $wp_rewrite->preg_index(2)
);
它工作得很好,并形成了如下url结构:domain.com/cars/manufacturer/bmw/type/suv

但是,我无法解决如何从url中删除分类法段塞。预期的结果是: domain.com/cars/bmw/suv