Codecide

Blog

How to edit your Page Not Found in WordPress

In this article, I’m going to show you what you need to modify the content of your 404 page.


What do you do when you realize that

  1. the most popular page on your website is the 404 error page?
  2. the same error page is displaying a bland, default message that doesn’t do anything to help to retain your visitors?

The normal answer is: you log in to your website and set out to customize the error page to match your needs. So you hop on to the error page — by typing ~/error or some random string at the end of your domain name — hoping there’s an “Edit Post” button somewhere. There’s only one problem: there’s no such button. Crap! Why is it that nothing ever works as it should?

So what do you do now?

  1. From the sidebar, select the Theme Editor item under the Appearance menu. This will bring up a code editor loaded with a theme file.
  2. Locate the 404.php file in your theme directory from the list on the right panel.
  3. Click on 404 Tempalte (404.php); the code will be displayed and you should be able to edit the HTML code and save the modified content as you wish.

The above recipe may or may not work as described. If it doesn’t, here are a few common conditions that would cause this not to work:

Hoping this helps.

Leave a Reply

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