How Do I Set a 404 Error in PHP and have the Bricks 404 Error Page show?

Yup.

I am using WPCodeBox 2 to insert the snippet after the plugins are loaded. I’ve tried other hook points but it doesn’t seem to matter the Bricks 404.php doesn’t return the custom template.

On some sites I generate 404 errors for Author pages, Date Archives, Uncategorized Category etc… Stuff that is not needed for the site and shouldn’t be accessible. Google advises that soft redirects to the home page, etc. shouldn’t be used in these situations as they should be a 404.

Others have notice this issue as well

1 Like