There was nothing wrong with my code above. I found the answer at the bottom of the Taxonomies page in the Codex:
If your site uses custom permalinks, you will need to flush your
permalink structure after making changes to your taxonomies, or else
you may see a “Page Not Found” error. Your permalink structure is
automatically flushed when you visit Settings > Permalinks in your
WordPress dashboard.
In my plugin I already had flush_rewrite_rules();
being called upon deactivation, and I had deactivated and reactivated it several times. The fact that this didn’t work really threw me for a loop.
But as soon as I visited Setting > Permalinks
it all worked correctly!
Related Posts:
- Custom post types, taxonomies, and permalinks
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Permalinks: custom post type -> custom taxonomy -> post
- Mixing custom post type and taxonomy rewrite structures?
- Remove taxonomy slug from a custom hierarchical taxonomy permalink
- Shouldn’t this be easy?! Custom post type/custom taxonomy permalink
- How do I append multiple taxonomies to the URL?
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Custom Post type & Taxonomy URL structure
- Combining Multiple Taxonomies in one URL
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- Why does a custom post type need the ”hierarchical’ args setting?
- How to modify URL structures in custom post types and taxonomies or terms
- Help with a TV series Rewrite structure
- custom post type permalinks with category and tags
- Permalink rewrite with custom post type and custom taxonomy
- Custom Post Type with Nested Taxonomy and Template Files
- Custom permalinks – post type – hierarchical taxonomy’s
- Semantic URL Custom Post Type and Taxonomies permalinks
- Page to display an archive of taxonomies
- How to create a permalink for custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to show custom taxonomy in the permalink?
- Date-based permalinks for Custom Post Type, and custom taxonomy permalinks
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Include taxonomy slug in url?
- Custom Taxonomy breaking pages permalinks
- Permalinks for custom post-types within custom taxonomies not found
- custom post type and custom taxonomy url conflict
- Custom post types, taxonomies, and permalinks
- Custom post types and permalinks
- Parent & Child Taxonomy slugs in custom post permalink
- Custom Post Types and independent Categories – complex Taxonomy
- custom permalinks based on taxonomies for custom post type
- Custom taxonomy in URL showing 404
- How Can I Change the Custom Post Type Slug to the Taxonomy Slug in the URL?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- create a subcatagory for a custom post type and out put url as posttype/subcategory/item
- custom-taxonomy/post_name instead of the default post_type/post_name
- Show custom post archive when custom post not specified
- Show custom post type relationships by taxonomy
- Permalinks /country/city/cpt/postname/
- Seamless permalinks between Custom Taxonomy and Custom Posts
- Custom post type and custom taxonomy with the same slug using the file page taxonomy only as directory
- Permalinks: custom post type -> custom taxonomy -> post
- CPT’s with landing page instead of archive – Url Rewrite?
- How to change permalink to include custom post type
- Custom post type permalink tag 404
- Hierarchical permalinks for custom post type and taxonomy
- set permalink for CPT
- Best way to specify “article type” in URL
- Template for custom post type when taxonomy is in the URL
- Permalink problems with custom post type and custom taxonomy
- Custom Post Type Advanced Slug
- How to filter a custom post type by custom taxonomy without 404
- Ideas on how to organize a project [closed]
- Change permalinks for custom post type based on taxonomy term
- Custom post type category permalinks and archive pages
- Is it possible to have hierarchical taxonomy and hierarchical custom post types in one permalink?
- Safe to throw 404 error in request filter?
- Multiple permalinks for a single post with multiple taxonomies
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- How to prefix custom post type URL with custom post taxonomy term?
- How do you create pillar content pages?
- Custom post type single page returning 404 error when sharing archive url with custom taxonomy
- Changing permalink of default Post with custom post
- Custom Taxonomy Archive generates 404
- Custom post type single with custom URL structure
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Customise Permalink Structure For Custom Post Types
- % encoded URL giving 404 error in WordPress
- How to create a permalink structure with custom taxonomies and custom post types
- Issue with Custom Post Types and Permalinks
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Pagination not working (page/2 retunring 404 page)
- Custom permalink with custom taxonomies for custom post type
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Change the url of a custom post type to include taxonomy
- Post Custom & Taxonomy 404 error
- Multiple archives for cpt, taxonomies, terms
- Same permalink structure for all post types?
- Multiple post types or single post type with category taxonomy?
- How to add base permalink to custom posts?
- Hierarchical taxonomy in permalink structure
- Permalinks when using Custom Post Type with static page for archive
- How to change permalinks to taxonomy and post type’s posts
- taxonomy term names in custom post type permalink structure
- Adding 2 CPT with multiple custom taxonomies to permalinks
- Parent cpt/child custom post type URL permalink relationship
- Custom Post Type Permalinks Problem
- Change Taxonomy Permalinks
- Category / Custom Post Type permalink issue
- Adding rewrite rules to Custom Post-type mixed with Taxonomy
- Remove slug from Custom Category Permalink + dual-category permalinks
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Add /blog to the “post” post type url
- Different CPT permalink base on taxonomy
- Is it possible for post and custom post type to share a category base slug?
- Modify permalink of CPT archive to support two taxonomies
- Permalinks for Custom Post Types and Taxonomies