WordPress Theme’s 404 File Getting Called Every Page Load?

I’m not totally on track with the issue because I don’t have enough information, or any troubleshooting that you’ve done beyond what appears to be happening from a user-standpoint, but I’m going to give you my best shot here.

In any situation where there are 404 issues, always try to:
(1) Reset the permalinks from your WP Dashboard.
(2) Try to reset your .htaccess file.

A quick Google of either of those troubleshooting steps should yield a guide on how to accomplish each.

If neither of those two troubleshooting steps accomplish resolve to the issue you’re experiencing, then I recommend you dive a little deeper. To begin troubleshooting this issue further than we have, we are going to need more information so let’s try the following:

Step 1.

Enable wp_debug (https://wordpress.org/support/article/debugging-in-wordpress/) so that we can see if there are any blaring PHP issues on the pages you’re viewing.

I would also try to find out which template is serving the current page that you’re looking at when you see the issue with all widgets and plugins enabled as they are when you notice the problem. This will take the addition of some code on your part. There’s a great summary on how to achieve this in the following link:

How do you find out which template page is serving the current page?

Step 2.

Then, I would disable all widgets and plugins; Go back to the problem-pages you identified in Step 1 (above), and see if the issue still exists. If so, identify which templates are serving these pages. (Notice whether there is a difference in the templates serving the problem-pages now that the widgets and plugins are disabled).

Work your way through the code of the template that’s been identified in each scenario and hopefully this will assist you in identifying where the problem is.

This is not a total solution, but at least a path to get you started. Add more information about what you’ve found from the steps above, and I’ll be happy to assist further. Good luck, and I hope this helps!