Please replace the “portfolio_create_taxonomy” funcation to below code
function portfolio_create_taxonomy() {
register_taxonomy(
'portfolio-category',
array( 'portfolio' ),
array(
'hierarchical' => true,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'label' => __( 'Category' ),
'rewrite' => array( 'slug' => 'portfolio-category' ),
'hierarchical' => true,
)
);
}
add_action( 'init', 'portfolio_create_taxonomy' );
Related Posts:
- Custom post type / taxonomy rewrite archive page 2 gives 404
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Filtering a custom post type by custom taxonomy in archive template
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- get term archive url / link
- Pagination throws 404 error on custom taxonomy archive pages
- Archive page with multiple taxonomies rewrite
- Create permalink structure for one taxonomy archive per custom post type
- How to check if last uri segment is a custom post type or taxonomy term?
- Custom permalinks – post type – hierarchical taxonomy’s
- How to show term-specific post list, without posts associated with child terms?
- Pages, Custom Posts & Custom Taxonomy defining slug structure
- How to show a tag archive of one post type only
- Custom taxonomy archive page not working
- Getting taxonomy terms used by custom post type
- How to show multiple post types on taxonomy archive?
- Disable single pages and archives and keep preview
- Custom Taxonomies: Multiple Hierarchical Permailnks For A Single Post + Prev/Next Links
- How to create archive page for taxonomy terms within custom post type
- Category and post tag archives do not include posts from custom post type
- Hierarchical Custom Post Types or Similar
- Get post type from taxonomy or category page
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- custom taxonomy archive by year
- Custom Posts Hierarchy? (State/City/Restaurant)
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Automatically populate a hierarchical taxonomy from a custom field
- Display custom post type taxonomies as an archive page
- Hierarchical Custom Post Types – Show only parent on tax archive?
- Display custom post type in hierarchical order with get_terms
- Should I use custom taxonomy or custom post type
- Archive page for taxonomy terms
- Custom Post Type Archive Page Filtering
- Root slug of taxonomy returning 404
- Custom Post Type / Two level deep taxonomy (cat. and subcat.) uri problem (error 404)
- Hierarchical Custom Post Types in Array
- Create template for taxonomy results limited by Custom Post Type
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Custom while loop for hierarchical display of a taxonomy
- Get the taxonomy of a post hierarchically
- Create more category hierarchical depth for custom post type/taxonomy plugin (widget)
- Hierarchial Custom Post Types/Taxonomies
- Hierarchical permalinks for custom post type and taxonomy
- Custom post type Permalinks with hierarchical Taxonomies
- How can I get this request to use the Custom Post Type page template instead?
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Archive for a Taxonomy of a Custom Post type
- What’s the name of the custom post type yearly archive template?
- Taxonomy archive 404ing (not term archive)
- Custom taxonomy or custom page templates?
- Dynamically insert an article at the top of a taxonomy archive – or?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Use the custom post type archive for taxonomies?
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- custom hierarchical taxonomy and custom post type list contains surplus posts
- Creating a non-hierarchical Taxonomy that behaves like categories
- Migrating Hierarchal Taxonomy Categories Between Post Types
- Ideas on how to organize a project [closed]
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- How should I structure complex content hierarchies?
- List child categories from parent category on custom taxonomy page
- Archive page for custom post type and custom taxonomy
- Advanced archive url structure (category, tag and date)
- How can I tell if I’m on a custom post type archive page?
- Custom Post Type Archive Page showing as 404
- Custom taxonomy terms hierarchical navigation
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- How to show custom post count in archive page
- Order archive custom posts by taxonomy term [duplicate]
- Custom category taxonomy – archive page not showing up
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Custom taxonomy archive slug overwrites static page
- Display a Custom Post Type within another with hierarchically slug
- Custom Post Hierarchy and users
- Custom Post Type tag taxonomy “Page Not Found”
- Custom Post Type categories at edit post not hierarchical
- How can I add a “fake” parent into the permalink?
- archive-{custom_post_type}.php not getting recognized wordpress
- Archive.php is not displaying tags
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- taxonomy term names in custom post type permalink structure
- Custom taxonomy archive not showing posts of certain child taxonomies
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Show custom category archive as front page and remove taxonomy slug from urls
- How to develop Knowledge center in WordPress Website
- Getting the Intersection of Two Custom Taxonomy Terms for a Custom Post Type?
- Custom Post Type Archives by Date with Custom Permalink
- Parent / Child formatting in a list of post of a custom post type
- Custom Taxonomy URL are redirecting to page with the same name
- Show a Category X’s custom post type on Category X archive page?
- Custom Taxonomy not being saved on custom posttype
- How to approach a site where it has sub-businesses, each with its own pages (“articles”, “staff”)? Don’t want to use WP multisite
- Creating custom post type posts and associating them with a post from another custom post type
- how to organize my categories or should I do custom post types for some?
- How do i display post from a taxonomy term?
- Multiple permalinks for a single post with multiple taxonomies
- Displaying taxonomies with manage_{custom-post-type}_posts_custom_column