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?
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- Custom Post Type Permalink / Rewrite not working immediately
- Best way to flush_rewrite_rules for custom post type, in a mu-plugins plugin?
- Custom rewrite rules for archive page and single post
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- CPT Template Not Showing – Getting 404
- Custom post type 404s with rewriting even after resetting permalinks
- Multiple post types – share same ReWrite slug?
- Rewrite rule for Custom post type Monthly and Yearly archive
- add_rewrite_endpoint() not working for custom post type archives
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- How to modify URL structures in custom post types and taxonomies or terms
- Adding meta values to permalink
- Archive page with multiple taxonomies rewrite
- 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
- Help with a TV series Rewrite structure
- Taxonomy archives based on Custom Post Type
- 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
- How to Add Pages Under Custom Post Type URL Structure?
- Prepend meta_value to permalink of post
- How to check if last uri segment is a custom post type or taxonomy term?
- Pagination Doesn’t Work
- Rewrite custom post type url’s adding meta box values
- Permalinks using event date (year & month) instead of publication date
- Multiple parameters in a custom post type url rewrite
- Permalinks for CPT breaks permalinks to pages
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- WP Rewrite Rules – Custom post type & taxonomy
- Custom Post Types: pretty search URLs and has_archive
- Need help with complex custom post type setup
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- WordPress monthly archive links result in 404
- Remove base slug in CPT & CT, use CT in permalink
- 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
- Custom Post Type rewrite redirects to homepage
- Disabling post_type in URL
- single-{post_type}.php is not loaded despite flushing rules
- Custom Permalink Tag breaks Pagination
- Adding paged query to custom URL rewrite
- WordPress rewrite my URL when i use pagination
- Custom Post Type rewrite rules not working, how to alter the rewrite order?
- Custom Permalink for Taxonimie and Custom Post Type
- how to get archive urls with same origin for custom types and terms?
- Rewrite numeric ID parameter for hierarchical custom post type
- Customising rewrite rules for CPT single post URL to work as paged URL
- Remove custom post type slug not working for child pages
- Adding the taxonomy before the custom post type
- 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
- Pagination problem
- 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?
- Permalink Structure CPT With Custom Taxonomy Fails
- Parent & Child Taxonomy slugs in custom post permalink
- Rewrite WordPress URL to show CPT meta field data
- Custom Post Type won’t Register
- Making a custom help center page
- Remove url rewrites for registered taxonomies
- Custom rewrite rule for hierarchical custom post type
- Rewrite and custom post type: order by custom field not working
- Custom post type “preview” not working
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Rewrite slug of custom post type to include post-id
- Display posts from Custom Post Type in category page on front-end
- 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
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- add_rewrite_rule not working in Custom Post Type UI Plugin
- CPT Archive Pagination – Page not found
- How to add custom permalink struct with DYNAMIC author to a Custom Post Type
- add_rewrite_rule not working with custom post type
- Url rewrite with custom post type and taxonomy
- Paginate yearly archives for a custom post type
- Custom archive URL as a subfolder of the custom post type slug
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- Two Permalinks with one Taxonomy (custom taxonomy) and (custom post type -> custom taxonomy)
- What is the best way to relate different custom post types?
- Dynamic WordPress rewrite rules for multiple custom post types
- 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
- How to change rewrite slug for custom post type without conflicting w/ child pages of page with same slug
- Remove date rewrite rule for custom post type archive page
- how to properly format custom post type rewrite to get specific URL structure for archive and post views
- How to add random prefix (based on related page slug) to custom post type?
- How does WordPress manage to differentiate between post and page URLs without a distinct base, and how can I replicate this functionality?
- Rewrite taxonomy permalink appended to CPT archive url