How to find out which function is causing a 404

Go to http://[your-site].com/wp-admin and have a look in the Posts or Pages menu (or if it’s a custom post type, the edit screens for your post type). Also, if it’s indeed there, check your permalinks (Settings > Permalinks) and save them even if you don’t make any changes. This will flush the permalinks, which might be all that’s needed.

How it works: If you did a DB dump of your site, and then imported it into another DB, you’ll get all the posts/pages/sundry other content, but your Permalinks need to be flushed to make sure that WordPress understands that a request from the browser for, say, ‘/products/acme-widgets/foo’ is really a request for the post with $post->ID 39. If you make changes to the permalink structure, the permalinks need to be flushed. This doesn’t happen automatically because it’s an intensive process.

Saving your Permalinks does a flush.

error code: 523