So it turns out that when the CPT was registered, the following was used in the “rewrite” argument in register_post_type:
rewrite => "recipes/%tax_rec_cat%"
I don’t know the intention of this, I suppose whoever wrote it thought it was necessary to include both that and the custom_links function I posted in the original question in order to include the taxonomy term in the permalink.
To fix the problem with the archive having a 404 error, I changed rewrite to true and removed the custom format. As soon as I flushed the rewrite rules, the CPT archive, taxonomy archive, and single post all load fine.
Related Posts:
- Can a custom post type have a Parent Page?
- Custom Post Type Permalink / Rewrite not working immediately
- Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?
- Multiple post types – share same ReWrite slug?
- add_rewrite_endpoint() not working for custom post type archives
- How to modify URL structures in custom post types and taxonomies or terms
- Modify custom post type rewrite rules in a separate function
- Permalinks so that one custom post type appears to be a child of another, not working
- How to achieve this permalink -> category-name/custom-post-type-name/post-name
- Change page /2 to /transcript with a Rewrite
- Using %postname% tag with a Custom Permastruct creates 400 Bad Request Errors from the server
- WordPress Custom Post Type Category Page
- Permalink rewrite with custom post type and custom taxonomy
- Prepend meta_value to permalink of post
- Rewrite custom post type url’s adding meta box values
- Multiple parameters in a custom post type url rewrite
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Need help with complex custom post type setup
- WordPress monthly archive links result in 404
- Rewrite rules for custom post type ‘attached’ to another custom post type
- wrong template for page of archive
- WordPress Rewrite rule for nested post types
- how to get archive urls with same origin for custom types and terms?
- Add hierarchical taxonomy to permalink for custom post type
- How to Combine Two Custom Post Types into Single Permalink Structure
- add_rewrite_endpoint() and Custom Post Type Archive
- How to rewrite custom post type with custom taxonomy urls?
- Custom post type with slug for plural (archive) and for single
- add_rewrite_rule and how to get the custom post into the worpress loop the correct way
- How much control do we have over CPT rewrite slugs? Can I create a “root” page for my CPT with out the page path, and then have paths for other pages?
- how to add extra GET parameters to post to url with add_rewrite_rule?
- Custom rewrite rule for hierarchical custom post type
- Rewrite and custom post type: order by custom field not working
- Rewrite slug of custom post type to include post-id
- How to change custom post type permalink structure
- Front custom edit post page for each post
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- Adding Post id to the end of slug in a Custom Post Type
- Rewrite Question Mark in Post Template to Make it Pretty URL
- How can achieve this permalink perfectly? domain.com/%category%/%post-name%
- Custom taxonomy rewrite with query var returns %2F in URL
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- cpt and page sharing same base permalink
- CPT Template Not Showing – Getting 404
- How to get list of taxonomy slugs ordered parents>childs?
- remove base slug from hierarchical custom post type
- Rewrite Endpoints and CPTs – How to use in a plugin
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- add_rewrite_rule and passing variables for custom post types
- Get url.com/post_type/taxonomy/term work!
- Relationship between set rewrite flag in register_post_type and add_rewrite_rule
- Custom rewrite to fetch feed data
- Custom post type paging 404 error
- Custom Post Type posts, conflict with posts after add_rewrite_rule to top
- Combine multiple CPT names to create valid permalinks
- Custom Post Type – Rewite Archive page
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- How to rewrite the post slug of a custom post type post
- rewriterule not working
- Custom post types and custom variables — add_rewrite_tag() not working
- Add Custom Values to Permalinks Through Custom Fields and Posts
- Why do I need to register my custom post type a second time when flushing rewrite rules?
- Custom post rewrite rule not working
- Subpages Permalinks Issues
- rewrite rules hierarchical
- Rewrite rules for custom post type
- Custom taxonomy and post type rewrite rules
- WordPress rewrite rule doesn’t work unless post category is explicitly called in regex
- Url Rewriting a dynamic wordpress page with parameters
- How to make a post accessible from multiple post type slugs?
- Rewrite URL for CPT to domain/post-name/post-id
- Custom Post Type add_rewrite_rule
- How to apply multiple rewrite_rule to a single custom post type url?
- Custom permalink structure for custom post types including multiple taxonomy
- Sudden 404 pages on product category archives
- CPTs relationship
- Change CPT permalink to use the category
- add_rewrite_rule wordpress ignoring url pattern, wp rewrite not working
- Rewrite url for custom post type with specific url
- Pagination URL in Custom Content Type
- Two CPT: one is using part of the custom rewrite slug from the other
- Custom post type rewrite and wp_pagenavi interfering with each other
- Custom taxonomy archive slug overwrites static page
- Group based routing and administration
- Adding Custom Taxonomy Along-with Post Name in Post Type Permalink
- how to use two permalinks for one custom post type based on categories
- Get the custom post type slug but remove the rewrite prefix?
- Custom Rewrite Tag Structure
- Custom post type child page 404
- Parent cpt/child custom post type URL permalink relationship
- Custom post type rewrite with_front
- How to make nested custom post type slugs work
- Rewrite Rule & Regex – Extract ‘cat-name’ and ‘page-number’ from http://domain.com/custom-post-type/category/cat-name/page/page-number
- CPT Template Not Showing – Getting 404
- Permalink of Custom Post Type
- Ideal top-level slug methods
- add_rewrite_rule not working in Custom Post Type UI Plugin
- How to add custom permalink struct with DYNAMIC author to a Custom Post Type
- Custom archive URL as a subfolder of the custom post type slug
- Need help creating a WordPress site that has a landing page and sub pages for an area (for example, “London”). Website will have 100’s of areas