Hack: Customize Your 404 Page

Your WordPress 404 page is an odd thing. You’d think it would just be a message you could set in your WordPress admin. But it is actually a whole file in your theme. Or, if the file is missing, you do get this default “Nothing Found” page.

Creating a custom 404 page is a matter of either editing your 404.php file in your theme, or better yet, duplicate it and add it to your child theme folder, and edit that. Then you can replace the text with anything you want. You can also add more text, like links to your most popular pages or categories.

If you don’t have any 404 page in your theme, then you may want to grab one from a default theme, like twentynineteen. Or, you could duplicate your single.php file and strip away all of the actual contents and adding some static text.

Leave a Reply

Your email address will not be published. Required fields are marked *