Taxonomy Permalink Issue w/ Sub-Cats
-
I have created a taxonomy product_category underneath another cpt products.
I have exported the code and included it in the theme of the site yet even with a rewrite set with hierarchical turned on it still only allows browsing to sub-categories under the main slug and under main slug/parent/child URL structure.
$labels = [ "name" => __( "Product category", "custom-post-type-ui" ), "singular_name" => __( "Product category", "custom-post-type-ui" ), ]; $args = [ "label" => __( "Product category", "custom-post-type-ui" ), "labels" => $labels, "public" => true, "publicly_queryable" => true, "hierarchical" => true, "show_ui" => true, "show_in_menu" => true, "show_in_nav_menus" => true, "query_var" => false, "rewrite" => [ 'slug' => 'product-category', 'with_front' => true, 'hierarchical' => true, ], "show_admin_column" => true, "show_in_rest" => false, "show_tagcloud" => true, "rest_base" => "product_category", "rest_controller_class" => "WP_REST_Terms_Controller", "show_in_quick_edit" => true, "show_in_graphql" => false, ]; register_taxonomy( "product_category", [ "product" ], $args );
I have even tried it using CPT UI in a developer environment in the attempt to see if there is something else happening and I can’t seem to get taxonomies that hierarchical to work.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Taxonomy Permalink Issue w/ Sub-Cats’ is closed to new replies.