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:
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- Custom rewrite rules for archive page and single post
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Custom post type 404s with rewriting even after resetting permalinks
- Rewrite rule for Custom post type Monthly and Yearly archive
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- Archive page with multiple taxonomies rewrite
- Help with a TV series Rewrite structure
- Taxonomy archives based on Custom Post Type
- Permalink rewrite with custom post type and custom taxonomy
- How to Add Pages Under Custom Post Type URL Structure?
- Permalinks using event date (year & month) instead of publication date
- Permalinks for CPT breaks permalinks to pages
- WP Rewrite Rules – Custom post type & taxonomy
- Custom Post Types: pretty search URLs and has_archive
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Remove base slug in CPT & CT, use CT in permalink
- Custom Post Type rewrite redirects to homepage
- Disabling post_type in URL
- single-{post_type}.php is not loaded despite flushing rules
- 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
- 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
- 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?
- Permalink Structure CPT With Custom Taxonomy Fails
- Parent & Child Taxonomy slugs in custom post permalink
- Making a custom help center page
- Remove url rewrites for registered taxonomies
- 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?
- Display posts from Custom Post Type in category page on front-end
- Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together
- Custom post type + category archive page
- Customize Custom Post Type URL
- How do I change the custom taxonomy slug to be the same as the custom post type slug?
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Rewrites/query for multiple hierarchical custom post types
- Post Type rewrite rule to point to custom Page/template
- Canonical url differs from custom post type archive URLs
- Default post tab showing twice in admin bar
- Custom post type permalink returns 404
- Make custom post types and pages place nice, re: rewrite
- add_rewrite_rule and passing variables for custom post types
- Use date in the URL of custom post type
- Get url.com/post_type/taxonomy/term work!
- Different rewrite rules for taxonomies and cp in multisite?
- How to add custom taxonomy in custom post type permalink?
- Add parent post to Custom Post Type [closed]
- Relationship between set rewrite flag in register_post_type and add_rewrite_rule
- Custom rewrite to fetch feed data
- 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
- SEO Concerns With Rewrite Rules
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- Rewrite permalink for multiple post types (CPT) with taxonomy term
- How to rewrite the post slug of a custom post type post
- rewriterule not working
- Custom Post Type with modified permalink structure results in 404
- Modifying rewrite rules to use /category//
- 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
- Custom Post Type Date Based Archive URL rewrite [duplicate]
- How to make a post accessible from multiple post type slugs?
- Rewrite URL for CPT to domain/post-name/post-id
- How to apply multiple rewrite_rule to a single custom post type url?
- Custom permalink structure for custom post types including multiple taxonomy
- CPTs relationship
- Change CPT permalink to use the category
- Rewrite url for custom post type with specific url
- Default custom post type url
- How to build overlapping custom post_type and taxonomy rewrites without conflicts?
- Two CPT: one is using part of the custom rewrite slug from the other
- Custom taxonomy archive slug overwrites static page
- Group based routing and administration
- Adding Custom Taxonomy Along-with Post Name in Post Type Permalink
- Permalinks for a custom post type – with a page template (custom query) and taxonomy archive
- how to use two permalinks for one custom post type based on categories
- WordPress custom post type rewrite rule matches all pages returning 404
- Get the custom post type slug but remove the rewrite prefix?
- Custom Rewrite Tag Structure
- Rewrite rules causing hole
- Parent cpt/child custom post type URL permalink relationship
- CPT Template Not Showing – Getting 404
- 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
- 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
- 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