custom post type archive page has 404 error even though has_archive is true

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.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)