You need to register the Custom Taxonomy BEFORE the Custom Post Type that it belongs to in order for the rewrite rule to work. The taxonomy needs to “exist” before the post type in order for WordPress to build the URL correctly.
Related Posts:
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- WordPress Doesn’t Generate Taxonomy Archive
- Single taxonomy for different custom post types
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Organising custom taxonomies and custom post types
- Custom Post Type Template based on Taxonomy
- Can I assign a template to a custom post type?
- Taxonomy, Terms, and Template Files
- Custom taxonomy not showing up when adding a new custom post type
- Using Templates with Custom Post Type UI
- How to list all categories and tags in a page?
- show tags of custom post type ONLY
- Create an archive page for custom taxonomies
- Taxonomy terms with edit/filter link in wp-admin, in the list of custom posts
- Custom templates for posts like for pages: page-{id} vs single-{id}
- Posts in Multiple Columns and Rows with one single loop
- Internationalize / translate custom post types & taxonomies
- Rewrite custom post & taxonomy to share same URL path
- Display different gutenberg template from selected post attributes
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- Trying to manage templates on a blog with lots of custom taxonomies
- Associate Taxonomies Across Post Types
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Pagination Issue: Custom Post Type In Index
- Create second custom 404 page for selected post type
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Relationship between two taxonomies and a custom post type [closed]
- Have a Custom Post Type index page display taxonomy items instead of posts
- How to get the post type from a category id?
- Custom Post type is being ignored in query
- Hide specific parent categories from post edit
- Create Template for Custom Post Type same like for Page
- Metadata for a taxonomy – is there any WordPress way of doing this?
- Using default WP menu functionality to link to custom post-type listing?
- How to display custom taxonomies with links in filter menu?
- How to Filter custom post type by taxonomy?
- Custom taxonomy and custom post type – wrong permalinks and template
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Show child custom post types list inside single parent custom post type
- Several post types on WP Query by tag and taxonomy
- How do I display the grand child items of a taxonomy term?
- Is it better to use WordPress Custom Post Types or Taxonomies?
- A case for Hierarchical Custom Posts
- Custom taxonomy returns 404
- Flush Rewrite Rules when new site is created on network
- Custom post type pages return 404 page?
- Unable to link categories to custom post type using standard function
- Enable taxonomies by post type in an array of CPTs
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- How does the ‘the_post_navigation()’ work for CPT’s?
- Custom post type – list posts based on meta_key and display them divided by CPT taxonomy category
- get_category_link() for custom post type does not include custom slug rewrite?
- make permalink go to a custom single.php file
- Targeting categories in custom fields
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- Remove categories taxonomy from custom post type
- Custom post type is using the index.php template
- Shortcode to return single custom post based on post taxonomy
- Template code to split a post and print a custom field?
- How to create a template to show child terms of a MAIN taxonomy
- Custom Taxonomy Terms in Menu lead to which page?
- Display 1 Post per taxonomy with polylang
- List of a specific Custom Post Type in Custom Template
- Require custom post type if is_admin() – template doesn’t show up?
- Shortcode in pages or tempate files for custom post type
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- Can I use the ‘category’ taxonomy for both posts and a custom post type?
- CPT : Next or Previous term link when has not adjacent post
- Display Custom Post Type Based on Taxonomy With WP_Query()
- How do i enable categories for my custom post type?
- How to add CSS class field in Custom Taxonomy?
- Taxonomy doesn’t follow slug permalink structure
- How do I force a CPT to select a shared custom template in Post Attributes?
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- Custom taxonomy with custom post type template not showing
- Values show up in custom home page but not in custom post pages
- How to create groups like that in buddypress?
- Filter Term By Parent Term – Custom Post Type
- Include template if a post is a single product
- Best approach to allow front-end display of posts’ reviewers?
- How to decouple custom post types components from template?
- get children from current variable (taxonomy) via shortcode
- Show Templates in Custom Post Type Editor
- Parent to another Custom Post Type – Template files not being recognized
- How to avoid hardcoded text in a custom page template?
- List all posts from custom post type by taxonomy
- Using custom post types within a section of a template
- Listing all custom post types using a specific term on the said term’s template page, in groups
- Problem retrieving custom field for a custom post type
- Only One Post of Custom Post Type Appearing on Template Page
- Choose custom post type template by category
- using a template for more then 1 page
- Get all active posts that are tied to a custom taxonomy for a custom post type
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- How can I produce multiple webpages with a different output based on one entry/Page/custom Page?
- custom taxonomy not return in the code
- How do I get parameters from the URL?