我修复了以下问题:
// Adds rewrite rules for shop post type
function gtp_add_shop_rewrite_rules() {
add_rewrite_rule( \'^shop/([^/]*)/([^/]*)/([^/]*)$\', \'index.php?shop-category=$matches[1]&width=$matches[2]&height=$matches[3]\', \'top\' );
add_rewrite_rule( \'^shop/([^/]*)/([^/]*)$\', \'index.php?shop-category=$matches[1]&width=$matches[2]\', \'top\' );
add_rewrite_rule( \'^shop/([^/]*)$\', \'index.php?shop-category=$matches[1]\', \'top\' );
}
add_action(\'init\', \'gtp_add_shop_rewrite_rules\', 10, 0);